Telethon: download files by id

Created on 17 Nov 2017  路  3Comments  路  Source: LonamiWebs/Telethon

Hi
I have a bot, which received video files from telegram and then , forwards them to a group and saves file_id attribute which looks like: BAADBAADugEAAhtqoUIuf-klTtwEDab. ( this is a fake ID btw )
How can I download media from group chat by this ID? media ID from messages with media are integers ...

Most helpful comment

Unless you login as a bot, you can't save files with this file_id, as it's specific to the bots and not to normal users. Why can't you just forward the media and save that? Also, I don't know the request to use if you login as a bot.

All 3 comments

Unless you login as a bot, you can't save files with this file_id, as it's specific to the bots and not to normal users. Why can't you just forward the media and save that? Also, I don't know the request to use if you login as a bot.

Thanks for the fast reply :) well the problem is that I have saved records in database , saying which video was the last video uploaded by the user. that is , I have records like this:
user, video_id, upload_time
there is a getfile method for bots, but unfortunately I can only download files smaller than 20mb .
guess I just have to crawl through the messages and recalculate my records, replacing all video ids.
thanks for the telethon btw, It made my life a lot easier :) ! keep up the good work :+1:

@rbabaee2014 thanks, goodluck :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aminhyper picture aminhyper  路  3Comments

adv-zl picture adv-zl  路  3Comments

ghost picture ghost  路  4Comments

pazis picture pazis  路  5Comments

JackCloudman picture JackCloudman  路  6Comments