Answer the question
In order to leave comments, you need to log in
How to use proxy in python for telegram bot?
Before writing logic to the bot, I decided to try to run it without logic, it gives an error
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.telegram.org', port=443):
Max retries exceeded with url: /bot1199951572:AAFT5CT8mEvmgQ5-Fqwbs6RdqbTJfFrxpIM/getUpdates?
offset=1&timeout=20
(Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection
object at 0x03F59BC8>: Failed to establish a new connection:
[WinError 10061] Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение'))
import telebot
token = "some token"
bot = telebot.TeleBot(token)
bot.polling()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question