This script will help you to create security copies on MEGA of the follows and followers of the twitter accounts you want. Also, the copies are compared to know if there has been any change and know if it was an unfollow, soft block or if the account is suspended.
- Python 3+.
- A Twitter developer account.
- A MEGA account.
- Clone (or download) the repository:
git clone https://github.com/la-lo-go/twitter-user-scraper
- Install the APIs packages:
python -m pip install -r requirements.txt
- In key.py complete the APIs variables:
- From the Twitter API:
consumer_key
[API Key],consumer_secret
[API Secret Key],access_token
yaccess_token_secret
. - From the MEGA API:
mega_email
ymega_password
.
- Run the twUserScaper.py file.
After you start the application you will see a menu with these options:
- Update or create the followers backup.
- Update or create the follows backup.
- Update and create the followers and follows backup.
- Download locally all the files from a user.
Next you have to enter the user names of the people you want to get their backup and resume. You can enter as many user names as you like (separated by spaces), all the resumes will be shown at the end.
This program uses the Mega.py API to store the backups of the users on a MEGA account in separated folders labled by the user ID.
The script uses a SQLite3 database to store the IDs and names to look up to the users that have already been copied so it can run way more faster and don't excced the API limit (900 users lookups per 15 minutes). If is not in the database it stores it.
The use of SQLite makes it easier to make security copies.
id | name | url |
---|---|---|
key of the database and unique for each account | @ of the user (variable to future changes) | direct url to the user profile |