如何解决如何使用Telethon获取到用户照片的链接
使用api是我的新手。我尝试使用方法GetUserPhotosRequest获取用户照片
def get_data(user):
with TelegramClient('anon',api_id,api_hash) as client:
result = client(functions.photos.GetUserPhotosRequest(
user_id=user,offset=0,max_id=0,limit=0
))
client.flood_sleep_threshold = 24 * 60 * 60
array_of_photos = result.photos
for photo in array_of_photos:
file_reference = photo.file_reference
file_id = photo.id
access_hash = photo.access_hash
path = client.download_media(access_hash)
return path
但是我的函数返回None。请帮我弄清楚
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。