Nukesor / archivebot

:floppy_disk: A telegram bot for backing up and collecting all kinds of media.
MIT License
98 stars 33 forks source link

Is this works with only chats. or can we use it to download big files to our server from telegram server #4

Closed arvs47 closed 5 years ago

Nukesor commented 5 years ago

I don't really understand the question... The archivebot downloads all files from all the chats you want to watch your server. You can then decide to push the files of this chat back into the chat with the /zip command, but this isn't necessary. All files of the chat will always be on your server.

Nukesor commented 5 years ago

Just read the README: For instance, this is great to collect images and videos from the members of your last holiday trip or to simply push backups or interesting files from your telegram chats to your server.

arvs47 commented 5 years ago

Ok , does this work for all , like a public bot , I send a file to the bot and it simply download the file to the server , , and any size limit , if I forward a film to the bot it will download to our server right ,any size limits like 50mb or 1.5 gb

Nukesor commented 5 years ago

I'm not sure about size limits for downloads as a normal bot, but there are definitely no limits as a userbot (Just the usual 1.5GB from telegram). All I know is that you can't upload stuff with a normal bot (not a userbot), since the upload limit is 20 MB. In general it's a good Idea to run the Bot as a Userbot, since you can't scan the whole chat as a normal bot.

arvs47 commented 5 years ago

What's does it mean , a userbot , is it different from that we created using botfather , and one more can I able to host it in Python anywhere and backup server as google drive to store the files ,

Nukesor commented 5 years ago

A userbot is a program that runs just like a normal telegram client. (The normal stuff, telephone number, validation code, No botfather). Check the configuration section in my README. You need python3.6+. The files are downloaded to a path. So if you can mount your google drive to a system path there should be no problem. Otherwise you need to write that yourself.

arvs47 commented 5 years ago

yeah , got it , look like i need to study about userbot , , if you have any information about user bot you can pass it ,

yeah that needs to be coded , i am not an expert in coding , just know the basic , as i have already a git repo which uses aria2 to download the file to server and then upload that to google drive , but that is written in node.js , also connection to server back end as google drive is not possible i think, because when i looked for it there is nothing which can download directly to gdrive there are some service which help to download url to gdrive but implementing that to the api level it seems very difficult task especially in python ,

maybe you can try and implement this as a feature later ,

Nukesor commented 5 years ago

Actually, I don't think that I'll ever implement this feature, since I don't use google drive and I don't have any motivation to do so ;). That's why I can't help you with the google drive stuff as well. I have no Idea how it works :D.

But if you manage to find a way for achieving your goal, feel free to create a Pull request, I'll be happy to review.

arvs47 commented 5 years ago

ok i will try this ,but i am not sure about the success rate , as i am not a code guru and dont know much about the python , one more , i didn't get the userbot , can you provide some urls to learn how to create one and configure it , if there is something like that , when i searched in google i got all docs with bot api ,

Nukesor commented 5 years ago

There is not much to it. Telethon is a telegram client library. It can use the telegram client API and the telegram bot API. A userbot is nothing else than a bot that pretends to be a normal telegram client. Basically a userbot is an automated telegram client.

arvs47 commented 5 years ago

ok so in your script it is based on telethon or it has userbot function ?

Nukesor commented 5 years ago

My bot uses telethon and thereby it features either userbot or normal telegram bot functionality, depending on the configuration.....

arvs47 commented 5 years ago

ok thank you , i will try to host in my vpn, and let you know if anything comes ,

arvs47 commented 5 years ago

https://medium.com/@annissouames99/how-to-upload-files-automatically-to-drive-with-python-ee19bb13dda .this is what i am looking for but dont know how to implement in your script , will try