Get a random tweet from Twitter based on an input keyword.
- Python 3.x (developed on 3.4.3+)
- Some pip libraries, installable with the command below
- File named
credentials
in same directory, containing twitter key & secret separated by line break (\n)
Run pip install -r requirements.txt
to install these dependencies.
Example credentials file:
anbckdfiiettddv
NBD120fkdfipODeffNBDf334kdfipODe554ff
Visit https://apps.twitter.com/ to get your API key and secret strings.
python random_tweet.py <search_term>
python random_tweet.py apple
@username_here: An apple a day #try2 #crashed (@ 11 Penn Plaza in New York, NY) https://t.co/yyy https://t.co/zzz
media: https://pbs.twimg.com/media/Cb1eILsWAAAXmDj.jpg
To run basic tests,
./run_tests.sh
MIT License