]> git.armaanb.net Git - bin.git/blob - tweet-grab
git-mirror: add script
[bin.git] / tweet-grab
1 #!/usr/bin/env sh
2 # Grabs tweets and writes them to a file. Avoids using the twitter API by
3 # scrapping nitter.net (or any other nitter instance) which can easily be
4 # scraped, unlike the intentionally crippled twitter.com. See the output of
5 # this script at https://ishaan.bhojwani.org
6
7 FILE=/root/tweets/index.html
8 LOGFILE=/root/tweets/cron.log
9
10 > $FILE
11 curl https://nitter.net/keshinko | grep tweet-content | head -n 1 | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*\(.*$\)/\1/' >> $FILE
12 tail -n 1000 $LOGFILE > $LOGFILE
13 date -R >> $LOGFILE