In this tutorial, I will show you the way I implemented basic functions like: scrape members even add members to Telegram group on Android phone.
If you can find open codes to scrape members from telegram groups and add those messes to the different group. If not, you could visit my repository.
Requirements
- Android phone: Because of my main phone run Android OS and this guide is just compatible to Android. You could decide to use similar software or applications in this article when you did not use Android.
- Solution to move files from PC to your phone: I edited some files for 2 main function (scraping and adding) on PC before putting to the phone. Many ways to do that. You could upload from cloud or send as attach file to your phone.
- Application on Android device: Pydroid 3 was used in this article. This Actually, this was language learning application, It supported installing external library, terminal to interact with files/commands. Of course, you could get similar one from CH Play.
- Telethon API: We will work with a major library which is Python library and we use Python language in this application.
Let’s start
We need to prepare python files for scrape data in telegram group.
We have: api_id, api_hash and phone. They are variable that you have to create before (refer this link).
Scrape file will return a list in csv format all members in optional group. That includes: username, User ID, access hash, group name, group ID, …
We have to get another file to add member, see code below:
Open your Pydroid application, choose terminal and move to your directory. Make sure that necessary files (add.py and .csv) in that directory.
Just run and wait your results.
In this guide, we concentrated on running on mobile platform instead of focusing on programming (scrape or add member from a group to other one).
You can refer scraping on this, adding on this.