kaihendry / greptweet

Sane twitter backup and search
https://greptweet.com/
Other
76 stars 10 forks source link

More helpful error messages when Twitter fails #2

Closed nisc closed 12 years ago

nisc commented 12 years ago

When the fetch_tweets.sh script encounters the fail whale page ("Twitter is over capacity"), a rather obscure message is thrown. I had to delete the current progress and start over, because there was some locking bug.

Status: 200 OK
X-RateLimit-Limit: 150
X-RateLimit-Remaining: 143
X-RateLimit-Class: api
X-RateLimit-Reset: 1326548979
sed: -e expression #1, char 71: unknown option to `s'
Before: 400 After: 598
598
niscr tweet total 866 is greater than the already saved 598
Trying to get 268
curl -s "http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=niscr&count=200&page=4&include_rts=true&trim_user=1&include_entities=1"
0
/tmp/tmp.SkAr1jUeUL:85.27: Entity 'copy' not defined
          <li class="first">&copy; 2011 Twitter</li>
                                  ^
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;en&quot; xml:lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
    &lt;meta http-equiv=&quot;Content-Language&quot; content=&quot;en-us&quot; /&gt;
    &lt;title&gt;Twitter / Over capacity&lt;/title&gt;
    &lt;link href=&quot;//si0.twimg.com/sticky/error_pages/favicon.ico&quot; rel=&quot;shortcut icon&quot; type=&quot;image/x-icon&quot; /&gt;

    &lt;style type=&quot;text/css&quot;&gt;
      /* Page
Twitter is returning empty responses on page 4 :(
kaihendry commented 12 years ago

Be good if we could track down this locking bug.