A
A
Aleksandr2019-04-26 16:43:19
Python
Aleksandr, 2019-04-26 16:43:19

Why proxy telegrambot doesn't work?

Why does not work, the proxy is 100% working, there is access to the API through the browser

import telebot;
bot = telebot.TeleBot('%token%');
from telebot import apihelper

apihelper.proxy = {
'http': 'http://@177.8.216.106:8080'
}
@bot.message_handler(content_types=['text'])
def get_text_messages(message):
    if message.text == "Привет":
        bot.send_message(message.from_user.id, "Привет, чем я могу тебе помочь?")
bot.polling(none_stop=True)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aleksandr, 2019-05-29
@QQQ-RRR

Solution:
We use working socks5

from telebot import apihelper
apihelper.proxy ={'https':'socks5://*****:*****'}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question