A simple app for collecting tweets from Twitter API by given hashtags or account name
├───assets
└───data
├───notepad2
├───src
│ └───tweetscrapper
└───tests
virtualenv venv
venv/bin/activate
venv\Scripts\activate.bat
pip install -r requirements.txt
python -m unittest
- Login to your account on Twitter https://twitter.com/login
- Create dev account https://developer.twitter.com/en/portal/petition/essential/basic-info
- Create a new app and project. https://developer.twitter.com/en/portal/dashboard
- Copy all the keys from the app and keep them in the
api_keys.json
file (this version only needs the bearer token) You can paste your keys in theyour_api_keys_sample.json
file and cut off 'your_' and '_sample' from the file name.
This section contains minimum information that you need to know to quickly run tweet-manager.
Follow these steps to run your first job with tweet-manager:
-
Open configuration file (you can simply open it by clicking Edit Configuration File.bat
-
Specify keys_path as a full (absolute) path to the json file where your Twitter Api keys are stored.
-
Run tweet-manager.
This will create output file with a name specified by output_path in the input folder (location of input file).
A job is defined by 5 parameters:
-
Batch mode As you can see - the vast part of parameters can be stored in [DEFAULT] section of config file. The only one thing you have to specify in the jobs is the hashtag or account name.
- Beta version (Minimum viable product)
- Merge all json files into big one
- Add tool to find current most popular hashtags
If you find a bug, you have an idea for improvement or you need help, let me know: