电视在美国被封锁了吗?

发布于 2025-01-25 07:00:25 字数 517 浏览 0 评论 0原文

我从美国服务器上的官方指南中运行了一个简单的示例,并收到了错误:“ 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝天白云 2025-02-01 07:00:25

好的,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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文