X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=tweet-grab;h=e6770a4fe11142b27c3c80b1daa9bfc5627cd76a;hb=f840ce3d2989c8e22bcb2ea47b0ed31ab26564e1;hp=8e94dc8daaf50f10058c2a26367f96f9bf6c42ee;hpb=bba93ca0f2a6949afb18238aca5b9a8e5e8178c5;p=bin.git diff --git a/tweet-grab b/tweet-grab index 8e94dc8..e6770a4 100755 --- a/tweet-grab +++ b/tweet-grab @@ -1,7 +1,13 @@ #!/usr/bin/env sh +# Grabs tweets and writes them to a file. Avoids using the twitter API by +# scrapping nitter.net (or any other nitter instance) which can easily be +# scraped, unlike the intentionally crippled twitter.com. See the output of +# this script at https://ishaan.bhojwani.org + FILE=/root/tweets/index.html LOGFILE=/root/tweets/cron.log + > $FILE curl https://nitter.net/keshinko | grep tweet-content | head -n 1 | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*\(.*$\)/\1/' >> $FILE -echo "$(tail -n 1000 $LOGFILE)" > $LOGFILE +tail -n 1000 $LOGFILE > $LOGFILE date -R >> $LOGFILE