This software will perform an automated search for U.S. Congress members' social media posts about the Middle East. Posts are categorized by country and the results are neatly formatted in HTML. Currently supports Tweets (GETTR was supported but removed).
- Config.txt - Various config parameters.
- Credentials.txt - Access tokens for Twitter and GitHub are placed here. These allow Python to connect to those websites' APIs.
- CustomizedTwitterHandles.txt - The master list of Twitter handles. Add or remove from this list as Congress members come and go.
- Email.txt - Email addresses for sending the daily results.
- Keywords.txt - These are the words that are searched for in the social media posts.
- HTML templates - Python will use these templates and fill in the data before publishing them to the web.
- Includes this readme file and also the HTML results for all the scans done so far.
- Various helper scripts to scrape data and look for more Twitter handles. Not part of the daily scan.
- Automate.py - The main entry point of the program which will load all the other scripts and use them as necessary.
- Most of the other scripts can be run stand-alone which is useful when debugging.
- Create a Twitter Developer account. You will receive a Bearer Token which can be placed in the file config/Credentials.txt.
- Install Python
- Run the following commands at a command prompt to add the needed Python modules:
pip install tweepy
pip install jinja2
pip install PyGithub
pip install pytesseract
pip install numpy
pip install beautifulsoup4
pip install brotlicffi
pip install brotli
- Download the source code from the green button above: Code -> Download ZIP
- Unzip the source code and navigate to the src directory.
- Run this command at a command prompt while in the src directory to start the daily automated scan:
python ./Automate.py
Huge thank you to the contributors at the congress-legislators project for making so much data available about each member of Congress.
Whether I agree or disagree with a member of Congress, I want to know what they are saying about the wars and human rights issues in the Middle East. A daily automated search through their social media posts is a good way to do that. This project was inspired by the great work being done over at the Foundation for Middle East Peace.
This page contains a list of all the daily scans that have been uploaded: