X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=tweet-grab;h=b6e7fc091da43fc04eecbbb932acbe6b8b93b2c5;hb=55a218e51cd587265c04508f816b8b2fff56840e;hp=fa6faefb37f2e00eb18f2695458d726f765c6dcb;hpb=a81b29d421e62966c6710115522b323a13ce7afd;p=bin.git diff --git a/tweet-grab b/tweet-grab index fa6faef..b6e7fc0 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 -tail -n 1000 $LOGFILE > $LOGFILE -date -R >> $LOGFILE +INSTANCE=https://nitter.fdn.fr + +curl $INSTANCE/keshinko | grep tweet-content | head -n 1 \ + | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*\(.*$\)/\1/' > $FILE +date -R > $LOGFILE