电视在美国被封锁了吗?
我从美国服务器上的官方指南中运行了一个简单的示例,并收到了错误:“ ConnectionError:连接到电报失败5次”。我尝试了美国笔记本电脑,同样的错误。
然后,我尝试了工作的HK服务器。 TG API是否在美国?
我正在使用的示例:
from telethon import TelegramClient
# Use your own values from my.telegram.org
api_id = 12345
api_hash = '0123456789abcdef0123456789abcdef'
# The first parameter is the .session file name (absolute paths allowed)
with TelegramClient('anon', api_id, api_hash) as client:
client.loop.run_until_complete(client.send_message('me', 'Hello, myself!'))
I run the simple example from the official guide on a US server and got the error: "ConnectionError: Connection to Telegram failed 5 time(s)". I tried a US laptop, the same error.
I then tried an HK server, which worked. Is TG API blocked in the, US?
The example I'm using:
from telethon import TelegramClient
# Use your own values from my.telegram.org
api_id = 12345
api_hash = '0123456789abcdef0123456789abcdef'
# The first parameter is the .session file name (absolute paths allowed)
with TelegramClient('anon', api_id, api_hash) as client:
client.loop.run_until_complete(client.send_message('me', 'Hello, myself!'))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,
api.telegram.org
至少在我使用的网络上被阻止。我通过通过波兰TOR节点进行路由来解决。PS。电报在美国工作正常。电报!=电视
OK,
api.telegram.org
is blocked in the US, at least on the networks I'm using. I worked it out by routing through a Poland Tor node.PS. Telegram works fine in the US. Telegram != Telethon