eternnoir / pyTelegramBotAPI

Python Telegram bot api.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why did I set up an http proxy and this proxy is available, here is my code

2622594863 opened this issue · comments

Why did I set up an http proxy and this proxy is available, here is my code

import telebot
from telebot import apihelper

apihelper.ENABLE_MIDDLEWARE = True
apihelper.proxy = {'http': 'http://127.0.0.1:7890'}

bot = telebot.TeleBot("5292619197:AAGWyQteqHXiB6v1yFVOML",
parse_mode=None)
print(bot.get_me())

could you elaborate your issue more

could you elaborate your issue more

Of course, because I can't access Telegram directly in Chinese Mainland, I need to use a proxy to connect to it. According to my code, I used the proxy 127.0.0.1:7890, but I still can't connect to Telegram. I can guarantee that my proxy is available

any errors