This is a simple image file download from telegram channel
step1 : my.telegram.com去申请api
step2: pip install telethon
step3: use telethon download image from channel, this is get.py, you can just run python get.py
import uuid
from telethon import TelegramClient, events, sync
from telethon.tl.types import PeerUser, PeerChat, PeerChannel
api_id=fakeid
api_hash='thisi is fake hash'
client = TelegramClient('session_name', api_id, api_hash)
client.start()
titswiki = client.get_entity('titswiki')
c = client.get_entity(PeerChannel(titswiki.id))
for m in client.iter_messages(c):
print(m.download_media("image/"+str(uuid.uuid1())))
Update: you can find script here
This is a simple image file download from telegram channel
step1 : my.telegram.com去申请api step2: pip install telethon step3: use telethon download image from channel, this is
get.py
, you can just runpython get.py