如何处理pyrogram中的代理连接超时

2024-06-28 22:03:52 发布

您现在位置:Python中文网/ 问答频道 /正文

出现超时错误时,我想连接另一个代理。但超时错误不是加薪,所以我不知道如何处理。你知道吗

这是我的密码:

from pyrogram import Client

app = Client(
"test",
api_id=235617,
api_hash='a50c4ad0c480c5665b47e2779e948b5c',
app_version ='1.0',
proxy=dict(hostname="5.8.18.84", port=33308),
) 


app.start()

输出:

Error connecting to SOCKS5 proxy 5.8.18.84:33308: timed out


Tags: fromtestimportclientapiidapp密码