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

  1. Clone the repo

  2. Install dependencies by running pip install TwitterSearch Jinja2 pdfkit slugify and downloading wkhtmltopdf

  3. Rename to

  4. Create a new Twitter app and fill in your API keys. Never commit API keys to git

  5. template.html to change the styling, layout, tags, etc.

  6. Open and change client to your client's name and update keywords with a list of keywords / urls / hashtags / etc. that you want to search for.

  7. Run python and wait patiently while the script runs the search, iterates through the items, processes a jinja template, writes HTML, and finally converts to PDF.

  8. Take a nap, you deserve it.

FYI 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.

Built With

Share this project:


posted an update

  1. No joke, this script has literally saved me hours already.
  2. @Holly helped me update the styles for HTML / PDF, so they look nicer (not sure if I pushed those up - but they're Devpost specific, so probably won't)
  3. I uninstalled Hootsuite Extractor and killing the server. That's how confident I am in this project.

Log in or sign up for Devpost to join the conversation.