Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle 429 errors like 403 #55

Merged
merged 2 commits into from
Dec 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# Update this each time you make a non-cosmetic change.
# It will be added to the WARC files and reported to the tracker.

VERSION = '20181216.04'
VERSION = '20181216.05'
USER_AGENT = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html; ArchiveTeam)'
TRACKER_ID = 'tumblr'
TRACKER_HOST = 'tracker.archiveteam.org'
Expand Down
6 changes: 5 additions & 1 deletion tumblr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ wget.callbacks.httploop_result = function(url, err, http_stat)
end
end

if status_code == 403 or status_code == 400 or status_code == 0 then
if status_code == 403 -- banned
or status_code == 400 -- ?
or status_code == 429 -- rate limit exceeded
or status_code == 0 -- download error
then
--if string.match(url["host"], "")
if string.match(url["host"], "assets%.tumblr%.com")
or string.match(url["host"], "static%.tumblr%.com")
Expand Down