Skip to content

Commit

Permalink
Merge pull request #51 from Fusl/failon403
Browse files Browse the repository at this point in the history
Abort grab when IP banned
  • Loading branch information
kiska3 committed Dec 16, 2018
2 parents c23eb95 + 44a834b commit 8b348c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tumblr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ wget.callbacks.get_urls = function(file, url, is_css, iri)
end
if allowed(url, nil) then
html = read_file(file)
if string.match(html, '<title>Request denied.</title>') then
abortgrab = true
return urls
end
for newurl in string.gmatch(html, '([^"]+)') do
checknewurl(newurl)
end
Expand Down

0 comments on commit 8b348c5

Please sign in to comment.