twitter_ebooks 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twitter_ebooks/archive.rb +8 -2
- data/lib/twitter_ebooks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1653168f35eb5cda95944202507474e06124058
|
4
|
+
data.tar.gz: 702e6a68681f85195b296cc514f9754fd46118ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 476ed9ec5398f779b3f636ebf1c5cb439fa7c88523846f7c01b8564175f1a2ff14f4da67f7f3751014e755539b2ecdbf302a60a0d87990b19f6d6a931a3d8b22
|
7
|
+
data.tar.gz: b9b0ea74a8c0ca546ae176f9495921edcebd6ddfb21dd8dc5148e0057642032d4257740e9acef8d428ce2ebd89fc7884aeb91f8f55ec1d39765fb940feea7873
|
@@ -73,10 +73,16 @@ module Ebooks
|
|
73
73
|
|
74
74
|
loop do
|
75
75
|
opts[:max_id] = max_id unless max_id.nil?
|
76
|
-
|
76
|
+
begin
|
77
|
+
new = @client.user_timeline(@username, opts)
|
78
|
+
rescue Twitter::Error::TooManyRequests
|
79
|
+
log "Rate limit exceeded. Waiting for 5 mins before retry."
|
80
|
+
sleep 60*5
|
81
|
+
retry
|
82
|
+
end
|
77
83
|
break if new.length <= 1
|
78
84
|
tweets += new
|
79
|
-
|
85
|
+
log "Received #{tweets.length} new tweets"
|
80
86
|
max_id = new.last.id
|
81
87
|
end
|
82
88
|
|