From aadd672f7805755f10cf7018e85362c1bafcc369 Mon Sep 17 00:00:00 2001 From: Kai Hendry Date: Sun, 10 Feb 2013 11:25:00 +0800 Subject: [PATCH] Magic from Trent --- fetch-tweets.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch-tweets.sh b/fetch-tweets.sh index 94545ab..ef2a4ba 100755 --- a/fetch-tweets.sh +++ b/fetch-tweets.sh @@ -32,7 +32,8 @@ then test "$2" && since='&max_id='$(tail -n1 $1.txt | cut -d'|' -f1) # use max_id to get older tweets fi -while urlargs="screen_name=${1}&count=200&page=${page}${since}&include_rts=1&trim_user=0&include_entities=1"; echo $urlargs; $(dirname $0)/oauth.php $urlargs | json -d '|' -a id created_at text > $temp2; test $(wc -l < $temp2) -gt 0; +while urlargs="screen_name=${1}&count=200&page=${page}${since}&include_rts=1&trim_user=0&include_entities=1"; echo $urlargs; $(dirname $0)/oauth.php $urlargs | +json -d '|' -a id created_at -e 'this.t = this.text.replace(/\s*\n\s*/g, " "); this.entities.urls.forEach(function (u) { this.t = this.t.replace(u.url, u.expanded_url) });' t > $temp2; test $(wc -l < $temp2) -gt 0; do #cat temp2