在 TelegramClient Telethon 中唱歌 [英] Singing in TelegramClient telethon

查看:50
本文介绍了在 TelegramClient Telethon 中唱歌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行代码后,我尝试输入密码(但我没有)并且无法输入任何内容.我使用 VS 代码

After running the code, I try to enter a password (but I don’t have it) and can’t enter anything. I use VS Code

  • 请输入您的电话(或机器人令牌):79622222693
  • 请输入您收到的验证码:40589
  • 请输入您的密码:(无法输入任何内容,我的帐户中没有任何密码)

尝试了不同的帐户.

    from telethon import TelegramClient, sync
    api_id = 973111111111145
    api_hash = '05c6f86e67922222222222225ad7615a8'

    client = TelegramClient('sessi1onname', api_id, api_hash)
    client.start()

推荐答案

from telethon.sync import TelegramClient

api_id = 0
api_hash = ''

with TelegramClient('sessi1onname', api_id, api_hash) as client:
    client.get_messages('me', "telethon sign in success")

使用此代码,然后在电报中检查您保存的消息.会为你工作.您尝试的方式不同步!

use this code and then check your Saved Messages in telegram. will work for you. way you are trying is not sync!

这篇关于在 TelegramClient Telethon 中唱歌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆