Skip URL on status code 204. Update version to 20200102.02.

pull/5/head
Arkiver2 5 years ago
parent ac65b0a818
commit cf3f6c7af9

@ -69,7 +69,7 @@ if not WGET_LUA:
#
# Update this each time you make a non-cosmetic change.
# It will be added to the WARC files and reported to the tracker.
VERSION = '20200102.01'
VERSION = '20200102.02'
USER_AGENT = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1)'
TRACKER_ID = 'reddit'
TRACKER_HOST = 'tracker.archiveteam.org'

@ -279,6 +279,10 @@ wget.callbacks.httploop_result = function(url, err, http_stat)
io.stdout:write(url_count .. "=" .. status_code .. " " .. url["url"] .. " \n")
io.stdout:flush()
if status_code == 204 then
return wget.actions.EXIT
end
if (status_code >= 300 and status_code <= 399) then
local newloc = string.match(http_stat["newloc"], "^([^#]+)")
if string.match(newloc, "^//") then

Loading…
Cancel
Save