Comments (8)
Update: this approach is working. I will know tomorrow if it catches all missing files. It is not downloading duplicates, and I see more files in the folders.. so this si a sensible workaround in any case. Many thanks!
from telegram_media_downloader.
@awb99 please check if the files are present inside another folder by mistake? like photo, video, voice
.
make sure that your config is exactly what you want and you are not filtering out some media types or file formats
media_types:
- audio
- document
- photo
- video
- voice
file_formats:
audio: ## all audio formats will be downloaded
- all
document: ## only pdf and epub will be downloaded every other format will be skipped in this case
- pdf
- epub
Yes change the last_id to 0 and re-runt the script it will download all files again but will check if the file is already present then the duplicate download will be removed. Please let me know how it goes also if the Telegram channel you are using is a Public channel then share it here so that I can try downloading the same and see what is happening.
from telegram_media_downloader.
The files are all in the correct folder.
Media types and file formats I kept the default config, so 'all' will be downloaded.
If you give me a telegram user then I can add you to the Channel.
The good news is that at least now with the fix a few days ago it is not aborting completely when there is a problem with one file. But would be great to have a sort of reliable backup tool.
from telegram_media_downloader.
I use "telegram desktop app" to check how many files there are .. and it still seems to download only 40% of them. In any case this is already better than exporting a channel manually; because telegram Desktop breaks after there is one problem; so big channels will never be exported at all.
from telegram_media_downloader.
The files are all in the correct folder.
Media types and file formats I kept the default config, so 'all' will be downloaded.
If you give me a telegram user then I can add you to the Channel.
The good news is that at least now with the fix a few days ago it is not aborting completely when there is a problem with one file. But would be great to have a sort of reliable backup tool.
Can you add deekayrav
user to the channel so that I can have a look and fix the issue?
from telegram_media_downloader.
I tried to add you; but it says your permission does not allow it.
from telegram_media_downloader.
The new code works much better and is getting many more files.
What I noticed is that when internet connection drops, then the script exits. Perhaps instead it should go to an endless loop,
or have configurable retries:
WARNING:pyrogram.connection.connection:Connection failed! Trying again...
INFO:pyrogram.connection.connection:Disconnected
INFO:pyrogram.session.session:Session stopped
INFO:pyrogram.connection.connection:Connecting...
WARNING:pyrogram.connection.connection:timed out
Traceback (most recent call last):
File "media_downloader.py", line 357, in <module>
main()
File "media_downloader.py", line 340, in main
begin_import(config, pagination_limit=100)
File "/usr/lib64/python3.7/asyncio/base_events.py", line 583, in run_until_complete
return future.result()
File "media_downloader.py", line 305, in begin_import
async for message in messages_iter:
File "/usr/local/lib/python3.7/site-packages/pyrogram/methods/messages/iter_history.py", line 85, in iter_history
reverse=reverse
File "/usr/local/lib/python3.7/site-packages/pyrogram/methods/messages/get_history.py", line 99, in get_history
sleep_threshold=60
File "/usr/local/lib/python3.7/site-packages/pyrogram/methods/advanced/send.py", line 81, in send
else self.sleep_threshold)
File "/usr/local/lib/python3.7/site-packages/pyrogram/session/session.py", line 460, in send
return await self.send(data, retries - 1, timeout)
File "/usr/local/lib/python3.7/site-packages/pyrogram/session/session.py", line 460, in send
return await self.send(data, retries - 1, timeout)
File "/usr/local/lib/python3.7/site-packages/pyrogram/session/session.py", line 460, in send
return await self.send(data, retries - 1, timeout)
[Previous line repeated 2 more times]
File "/usr/local/lib/python3.7/site-packages/pyrogram/session/session.py", line 453, in send
raise e from None
File "/usr/local/lib/python3.7/site-packages/pyrogram/session/session.py", line 441, in send
return await self._send(data, timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/pyrogram/session/session.py", line 395, in _send
raise e
File "/usr/local/lib/python3.7/site-packages/pyrogram/session/session.py", line 392, in _send
await self.connection.send(payload)
File "/usr/local/lib/python3.7/site-packages/pyrogram/connection/connection.py", line 80, in send
raise OSError
OSError
from telegram_media_downloader.
In the background, the script tries to re-connect. But running in an endless loop is not a solution.
Configurable reties I will add it to the backlog features.
Regarding the less number of files, those are duplicate files that are being skipped.
Closing the issue, create a new one if you face any other issues.
from telegram_media_downloader.
Related Issues (20)
- Error with downloading specified file type - rar HOT 1
- 0Mb downloaded files HOT 4
- This gets detected HOT 3
- error in tgcrypto HOT 2
- 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 2
- 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
- Tunnel
- [420 FLOOD_WAIT_X] would cause photos and videos which size is 0KB HOT 5
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.