download large file with local mode #3957
Unanswered
LOVELYZOMBIEYHO
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi. Please have a look at the wiki page https://github.com/python-telegram-bot/python-telegram-bot/wiki/Local-Bot-API-Server. I think that answers most of you questions. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am struggling to build a Telegram bot for downloading large files (videos). First of all, all functions run successfully except when running locally. I have searched for how to run PTB on a local server, but it's not working. I have a few questions:
I understand that if I use a local server, the API should be http://localhost:5002/bot{APIKEY}/getUpdates or http://127.0.0.1:5002/bot{APIKEY}/getUpdates (using my port) rather than https://api.telegram.org/bot{APIKEY}/getUpdates. Is that correct?
How do I enable local mode and set it up? Some discussions mention that I can enable local server mode with the following code, but it's not working for me:
application=Application.builder().token(bot_token).local_mode(local_mode=True).base_file_url(BASE_FILE_URL).base_url(BASE_URL).build()
Is this the correct way to enable local mode?
Do you have an example of a local server setup? I found this one: customwebhookbot.py, but I'm not sure if it's what I need. If it is, is it necessary to set up a webhook? If not, could you please provide an example?
Beta Was this translation helpful? Give feedback.
All reactions