]> git.armaanb.net Git - bin.git/commitdiff
tweet-grab: cleanup
authorArmaan Bhojwani <me@armaanb.net>
Sat, 20 Mar 2021 17:58:03 +0000 (13:58 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Sat, 20 Mar 2021 17:58:03 +0000 (13:58 -0400)
tweet-grab

index e6770a4fe11142b27c3c80b1daa9bfc5627cd76a..b6e7fc091da43fc04eecbbb932acbe6b8b93b2c5 100755 (executable)
@@ -6,8 +6,8 @@
 
 FILE=/root/tweets/index.html
 LOGFILE=/root/tweets/cron.log
+INSTANCE=https://nitter.fdn.fr
 
-> $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
+curl $INSTANCE/keshinko | grep tweet-content | head -n 1 \
+  | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*\(.*$\)/\1/' > $FILE
+date -R > $LOGFILE