繁体   English   中英

在 pythonanywhere 上运行 Telethon

[英]Running telethon on pythonanywhere

尝试运行一个基本脚本,通过 pythoneverywhere 服务器将成员添加到电报组。 我在服务器中安装了主要的 package,它是电视节目。 但我在下图中得到了错误。 我做错了什么? 错误信息如下

21:02 ~/Villians TV/Villians5/TeleGram-Scraper-master $ python3 villians5.py

Traceback (most recent call last):
  File "villians5.py", line 17, in <module>
    client.connect()
  File "/home/somti13/.local/lib/python3.8/site-packages/telethon/sync.py", line 39, in syncified
    return loop.run_until_complete(coro)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
    return future.result()
  File "/home/somti13/.local/lib/python3.8/site-packages/telethon/client/telegrambaseclient.py", line 472, in connect
    if not await self._sender.connect(self._connection(
  File "/home/somti13/.local/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 125, in connect
    await self._connect()
  File "/home/somti13/.local/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 250, in _connect
    raise ConnectionError('Connection to Telegram failed {} time(s)'.format(self._retries))
ConnectionError: Connection to Telegram failed 5 time(s)

电报的 mtproto 连接类型不适用于 PythonAnywhere 上的免费帐户。 只有 PythonAnywhere 之外的 http(s) 连接适用于免费帐户。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM