-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: unable to get history starting from 6000th message #717
Comments
I can confirm this, my script doesn't even get further than 3000 for groups. The callback simply isn't called anymore beyond that point. This is also the case with the lua binding when you request 3000 messages or more from a group (this can be demonstrated with telegram-cli-backup). I suspected it was a Telegram API limitation at first, but I tested with other clients (official Android and Telegram desktop) and they have no trouble replaying all the way back. |
You don't even have trouble replaying all the way back in tg-cli, it can't be a tg-cli bug. I once recalled a ~220.000 messages history at once with no problem, it just needed to load ~3 Minutes. Might it be a memory limitation in your script? I don't know your code.
|
My script just successfully pulled a ~70k group history after adding a This issue is a bug nonetheless, since the callback is never delivered to the script. The callback should of course always be dispatched, even on failure; that's what the
Also, this history example in README-PY.md suggests that the history can be retrieved in one go without rate limiting. @Surye I suggest adding a note about this practical limitation. |
@tvdstaaij and @LukeLR can you pls tell me more about what script you are using to getting chat history? I used telegram-cli-backup but it has a limitation. pls share your script, Thank you guys beforehand. Have a nice day! |
@Hushnud My latest script is telegram-history-dump, which supports various output formats and is extensible with additional formats. I use it as part of my scripts to automatically generate group chat statistics every night. It can handle 100k+ messages and also media file downloads without a problem, it just takes a while, because it inserts delays to prevent being cut off by Telegram servers. |
Thank you Tim @tvdstaaij for your quick response, i'm appreciated. I installed ruby 2 and json5. |
@Hushnud Telegram-cli has to be running while telegram-history-dump does its job. So you can start telegram-cli in one terminal window/tab and then start telegram-history-dump in another window/tab. Alternatively you can do it in one window with this variation: telegram-cli --json -P 9009 >/dev/null &
ruby telegram-history-dump.rb -k This way telegram-cli will run in the background and telegram-history-dump will shut down telegram-cli when the backup is done. |
Many many thanks for you Tim @tvdstaaij , Finally I got history. The main thing is i understood how code works. Thank you again man. It's pleasure to met person like you, who helping people. yeah definitely. Good luck and god bless you! with |
I'm writing a little script that save all media exchanged with a peer.
but i cannot get over 6000 messages, why ?
that's the script output:
than the script hang on...
value returned by
peer.history
is always true.thanks in advance for your help.
The text was updated successfully, but these errors were encountered: