0

При попытке включения, появляется следующая ошибка:

requests.exceptions.ReadTimeout: SOCKSHTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15)

Или ей подобные.

Вот, что прописал для прокси:

from telebot import types, apihelper

bot = telebot.TeleBot(token='токен:)', threaded=False)
apihelper.proxy = {'https': 'socks5://195.168.10.9:28354'}

bot.infinity_polling(timeout=10, long_polling_timeout = 5)

1 ответ 1

0

документация

apihelper.proxy = {'https':'socks5://userproxy:password@proxy_address:port'}

но если не работает попробуйте вот это

apihelper.proxy = {'https':'socks5h://userproxy:password@proxy_address:port'}

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.