Skip to content

This project allows you to get a complete list of twitter thread replies and be notified new twitter threads replies


Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



32 Commits

Repository files navigation

Twitter Scraper

This project is made of 2 scripts

  • to get a complete list of twitter threads replies so you can have a fast and complete view of complex threads even if you are not cited in all the tweet branches
  • to check and be notified about new twitter threads replies reads a text file fileed with tweets URL (one per line) in the following format<SCREEN_NAME>/status/<ID>

The script checks for replies to the given tweet and writes to stdout, keeping replies indentation.

Option -s gives a short output that can be useful to diff content between different iterations of the script; this way you can check for newer replies and notify.

usage: -f file [-s]
-f  : name of the input file that contains twitter URLs (1 per line) in the following format:<SCREEN_NAME>/status/<ID>
-s  : csv output; useful to diff content between different iterations of the script

Twitter Access Tokens

Before start playing with you need your Twitter access tokens (keys/secrets).

Generate here

Twitter's API doesn't allow you to get all the replies to a tweet, the script use it to search for replies to a given tweet and replies to any reply as well.


Twitter search API only returns results from last 7 days. This means that search results are limited to last 7 days


The script is tested with python 2 and 3 on Ubuntu (from 18.04 to 22.04)

To start playing with

  • install required pip packages:
# Python 2.7
sudo pip install python-twitter
sudo pip install pytz
# Python 3
sudo pip3 install python-twitter
sudo pip3 install pytz


Before first run change twitter access tokens. Find and replace following placeholders (mandatory)


Modify script local_timezone var to print tweet dates in your locale (optional)

local_timezone = 'Europe/Rome'

Full list here: is a bash script that uses csv output to diff between two iteration of the script and show new replies (if any).

Notice that the script execute the following command. -f tweet.list -s

Put your tweets in tweet.list file or edit TWEETLIST var

If curl is installed (sudo apt install curl) the tweet content is printed; in this case remember to set APIKEY and APISECRETKEY to the same value of CONSUMER_KEY and CONSUMER_SECRET in file

tweet content via lynx


command line

$ ./  -f tweet.list
[INFO] Start scraping from tweet URL

| From:	 Jesse V. Burke (@Jesse_V_Burke)
| Date:	 16/01/2019 14:01:07
| URL:
| @benkow_ Benkow I have slides analyzing bulehero probably 6+ months ago. DM me let’s chat about this c2

| From:	 Benkøw moʞuƎq (@benkow_)
| Date:	 16/01/2019 12:17:21
| URL:
| A lot of web vulns / BF  behind that binary (looks like a worm)

  | From:	 Benkøw moʞuƎq (@benkow_)
  | Date:	 16/01/2019 12:20:55
  | URL:
  | also Eternalblue
$ ./  -f tweet.list -s
16/01/2019 14:01:07,,
16/01/2019 12:17:21,,
16/01/2019 12:20:55,,



command line

$ ./ 
Log file found, archiving...
Executing ~/twitter-scraper/
Checking for new tweets...
Found  new replies

> New reply to tweet on 30/03/2020 11:32:10
>> link:
Giovanni fai come vuoi. Di solito non si fa cosi. E se è stato sistemato in meno di 6 ore (tra l'altro di domenica) significa che dietro ci sono persone in gamba e proattive che magari potevi aiutare senza tutto sto casino. Gli errori li facciamo tutti in ICT. Cmq grazie…" 




Based on the initial work made by @edsu


This project allows you to get a complete list of twitter thread replies and be notified new twitter threads replies







No releases published


No packages published