Twitter Search Report
This is the spiritual successor to HootSuite Extractor.
HootSuite changed their CSS (breaking HSE) and rather than refactoring a chrome extension and server-side code that rely on yet another SaaS product, I figured I could just write a better Python script and hit the Twitter API directly.
Basically, this script accepts a list of search terms (in my case, URLs, hashtags, and hackathon names) and runs an OR
search on twitter and compiles the results in HTML and PDF reports like these: [HTML] ยท [PDF]
How to use TSR
Clone the repo
Install dependencies by running
pip install TwitterSearch Jinja2 pdfkit slugify
and downloading wkhtmltopdfRename
keys_example.py
tokeys.py
Create a new Twitter app and fill in your API keys. Never commit API keys to git
template.html
to change the styling, layout, tags, etc.Open
one.py
and changeclient
to your client's name and updatekeywords
with a list of keywords / urls / hashtags / etc. that you want to search for.Run
python one.py
and wait patiently while the script runs the search, iterates through the items, processes a jinja template, writes HTML, and finally converts to PDF.Take a nap, you deserve it.
FYI all.py
lets you setup and loop through multiple clients & keyword sets all in one go. It'll also might hit up against the twitter API limits. Which it shouldn't, but IDK.
Log in or sign up for Devpost to join the conversation.