X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=tweet-grab;h=e6770a4fe11142b27c3c80b1daa9bfc5627cd76a;hb=64ee05791a30734150cb2d2e1a80edb4dbb1a216;hp=1d4fd9f7df7c28978019f822c6a61dc7e3244867;hpb=3312c57d8cd393f24307ed0a93c7aaa64f04a73a;p=bin.git diff --git a/tweet-grab b/tweet-grab index 1d4fd9f..e6770a4 100755 --- a/tweet-grab +++ b/tweet-grab @@ -1,8 +1,12 @@ #!/usr/bin/env sh -# Grabs tweets and writes them to a file +# 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