This program streams tweets from Elon Musk (or other influencers) and checks if the tweets contain references to popular stocks or cryptocurrencies. If the tweet contains text, it will scan the text for potential names or tickers of commonly traded stocks and popular cryptocurrencies. If the tweet contains images, the program will use Google VisionAI to annotate the images to determine if images contain references to stocks or cryptos. It can detect objects in images, logos, and text in images. If the program finds images or text referencing stocks or cryptocurrencies, it will send an SMS to the configured phone number using the Twilio API.
- Python 3.8
- Twitter developer account
- Twilio account (trial account is fine)
- Google Cloud Platform account (for image recognition)
- Clone repository
cd Dogefather
pip3 install -r requirements.txt
- Create a .env file and add Twitter API consumer key, consumer secret key, and bearer token as shown in .env.example
- Add the Twilio account sid and Twilio auth token to the .env file as shown in the .env.example file
- Add Google Vision API key to the .env file as shown in the .env.example file
- Add your phone number with +1 (ex: '+1800XXXXXXX') and your Twilio phone number in the same format as shown in .env.example
python3 TweetBot.py
stocks.json contains 100 most popular stocks and cryptos.json contains 5 popular cryptos. moreStocks.json contains all stocks and moreCryptos.json contains all cryptos. See https://cloud.google.com/vision/docs/setup for a quickstart of the Vision API.
- Streaming tweets from more accounts rather than just Elon Musk.