【问题标题】:use telepot (telegram bot python package) through socks5 proxy通过 socks5 代理使用 telepot(telegram bot python 包)
【发布时间】:2018-11-12 21:31:30
【问题描述】:

我想用烧瓶在本地主机上测试我的电报机器人 我使用telepot,需要设置socks5代理进行连接,但telepot默认只接受Http代理,有什么办法可以使用socks5代理而不是Http?

from flask import Flask
import telepot
app = Flask(__name__)
telepot.api.set_proxy('localhost:port')


@app.route("/")
def updates():
    token = "token"
    telegramBot = telepot.Bot(token)
    return telegramBot.getUpdates()

【问题讨论】:

    标签: python proxy bots telegram


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 2020-07-08
    • 2021-11-08
    • 2016-11-02
    • 1970-01-01
    • 2018-03-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多