Comments (8)
Yes. That's what I'm using.
But my intention was to download only one specific format. Like only .pdf
Currently, if you use document
in media_type
, all formats will be downloaded
from telegram_media_downloader.
@fabianski7 hi did you try using only document
as media_types
.
api_hash: your_api_hash
api_id: your_api_id
chat_id: telegram_chat_id
last_read_message_id: 0
media_types:
- document
I hope this is what you are looking for.
from telegram_media_downloader.
@fabianski7 now you can download specific file formats. pull in the new changes from master branch and update the config as follows:
api_hash: your_api_hash
api_id: your_api_id
chat_id: telegram_chat_id
last_read_message_id: 0
media_types:
- document
file_formats:
document:
- pdf
- epub
from telegram_media_downloader.
after several hours of capturing the messages (I think that's what was happening) I got this error
INFO:pyrogram.session.session:Send 8 acks
INFO:pyrogram.session.session:Send 8 acks
INFO:pyrogram.session.session:Send 8 acks
Traceback (most recent call last):
File "media_downloader.py", line 202, in <module>
updated_config = asyncio.get_event_loop().run_until_complete(
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "media_downloader.py", line 186, in begin_import
last_read_message_id = await process_messages(
File "media_downloader.py", line 165, in process_messages
message_ids = await asyncio.gather(
File "media_downloader.py", line 119, in download_media
file_ref, file_name, file_format = await _get_media_meta(
File "media_downloader.py", line 67, in _get_media_meta
file_name = os.path.join(THIS_DIR, _type, media_obj.file_name)
File "/usr/lib/python3.8/posixpath.py", line 90, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.8/genericpath.py", line 152, in _check_arg_types
raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
No files have been downloaded.
Well, it's a pretty big group with a lot of files, would that be any limitation?
from telegram_media_downloader.
my config file
api_hash: xxxx
api_id: xxxx
chat_id: xxxx
last_read_message_id: 0
media_types:
- document
file_formats:
document:
- mobi
from telegram_media_downloader.
this all generated a media_downloader.session
file of about 3.2M
from telegram_media_downloader.
@fabianski7 can you create this as a new issue, we can look into it there.
from telegram_media_downloader.
@fabianski7 can you create this as a new issue, we can look into it there.
os posible only download by Who sended? only download files by x person in the group
from telegram_media_downloader.
Related Issues (20)
- Telegram says: [400 PEER_ID_INVALID] - Trying to download specific user's posts HOT 1
- got an unexpected keyword argument 'reverse' HOT 5
- Error with downloading specified file type - rar HOT 1
- 0Mb downloaded files HOT 4
- This gets detected HOT 3
- error in tgcrypto HOT 1
- Bug with requirements HOT 1
- [401 AUTH_KEY_UNREGISTERED] - The key is not registered in the system HOT 1
- SSL: CERTIFICATE_VERIFY_FAILED HOT 1
- Integer too big HOT 1
- Download files within a group-channel only HOT 1
- The msg_id belongs to over 30 seconds in the future. Most likely the client time has to be synchronized.
- What should I do if I use a direct account suspension once
- Saved Messages as source? HOT 1
- Error during compiling HOT 1
- add progress bar in download file
- Script stopped working HOT 1
- downloader is not working on ubuntu 23.10 ( python3.11.6 ) HOT 1
- The msg_id is too low, the client time has to be synchronized. HOT 1
- File name with attribute ":" can't be named at Windows, getting error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram_media_downloader.