A Twitter bot for scraping data related to given twitter handle. This project is a part of backend intern challenge @ www.staqu.com
Specify your consumer key,secret and access key,secret in configuration.py file residing at staqu_bot/scripts/ folder
Execute the bot_cli.py file with following commands -
- -h or --handle : To specify the twitter handler/screen_name (mandatory), example
>>> python bot_cli.py -h staqutech
- -f or --follower : Flag specify downloading the follower data, example
>>> python bot_cli.py -h staqutech -f
- -t or --tweet : Flag specify downloading the tweet data, example
>>> python bot_cli.py -h staqutech -t
- --help : Open the help menu
- Both follower and tweet data can be downloaded simultaneously, example
>>> python bot_cli.py -h staqutech -f -t
- Specifying one flag is mandatory
- Downloaded data will be saved in dynamically generated folder residing at staqu_bot/data/
- File naming convention - [handle]_[data].tsv , Example staqutech_followers.tsv , staqutech_tweets.tsv
- Files are opened in a+ mode, so new data will be appended in existing file with same name