Anonymous ID: 6a246e May 6, 2018, 2:15 a.m. No.1316720   🗄️.is 🔗kun

# Twitter: Scrape / download a user's tweets on OS X

Isn't real pretty but it worked for me

Doesn't require a twitter API key

Scrapes twitter search instead

Most steps are performed in an OS X Terminal/shell

Requires basic shell experience

 

### Install homebrew

https://brew.sh/

 

### Install jq

brew install jq

 

### Install TweetScraper

https://github.com/jonbakerfish/TweetScraper

 

cd ~/Downloads/

git clone https://github.com/jonbakerfish/TweetScraper.git

cd TweetScraper/

pip install -r requirements.txt

 

### Run TweetScraper

Here, SaRaAshcraft, is an example twitter user name

 

scrapy crawl TweetScraper -a query="from:SaRaAshcraft"

cd Data/tweet/

find . -type f -print0 | while read -d $'\0' file; do jq 'select((.is_reply==false) and .is_retweet==false) | .text' $file ; done > ../saraashcraft-all.txt

 

### Open your new text file

Use any text editor to open your new saraashcraft-all.txt file

 

vim ../saraashcraft-all.txt