Answer the question
In order to leave comments, you need to log in
How to run a bot in python from behind a proxy?
I've been trying to connect a proxy to a completely simple bot for two days now, but it doesn't work!!
Gives an error after launch
ERROR - TeleBot: "SSLError occurred, args=(SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),),)
import telebot
bot = telebot.TeleBot('1190811079:AAEui3GQq1yJOk8pivrcjA8cVMIFBi1lI0A')
@bot.message_handler(content_types=['text'])
def lalala(message):
bot.send_message(message.chat.id, message.text)
bot.polling(none_stop=True)
Answer the question
In order to leave comments, you need to log in
You are not connecting to any proxy, but making requests directly, judging by your code.
And you don't need a proxy. For development, use a VPN, and select a server immediately without blocking.
Here is a list where you can host bots today in Russia: https://code.patriotovsky.ru/na-kakih-hostingah-v-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question