From 6cc2abf951b55f8c69a71558f3fbc043129d68e8 Mon Sep 17 00:00:00 2001 From: gutmet Date: Tue, 21 Apr 2020 22:30:35 +0200 Subject: [PATCH] fakenews: limit number of tweets --- fakenews | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fakenews b/fakenews index 268cab0..78fcace 100755 --- a/fakenews +++ b/fakenews @@ -9,6 +9,7 @@ # keep one twitter account per line in here accountsfile=".fakenews" outfile="/tmp/fakenews_out.html" +numberOfTweets=5 echo 'News' > $outfile @@ -16,6 +17,7 @@ while read account; do echo "

$account

" >> $outfile curl -H 'User-Agent:' -s "https://twitter.com/$account" | tscrape | + head -n $numberOfTweets | awk -F '\t' '{$1 = strftime("%d-%m-%Y %H:%M:%S",$1); print "
" $6 "
" $4 " " $1 "
"}' | sed 's/https:[^ ]*/&<\/a>/g' >> $outfile echo "
" >> $outfile