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

Update to 20181212.02 #30

Merged
merged 6 commits into from
Dec 12, 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
3 changes: 2 additions & 1 deletion pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
#
# Update this each time you make a non-cosmetic change.
# It will be added to the WARC files and reported to the tracker.
VERSION = '20181211.01'

VERSION = '20181212.02'
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
14 changes: 13 additions & 1 deletion tumblr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ allowed = function(url, parenturl)
or string.match(url, "^https?://" .. item_value .. "%.tumblr%.com/.*/amp$")
or string.match(url, "^https?://" .. item_value .. "%.tumblr%.com/rss$")
or string.match(url, "^https?://" .. item_value .. "%.tumblr%.com/reblog")
or string.match(url, "^https?://" .. item_value .. "%.tumblr%.com/.*%?route=") then
or string.match(url, "^https?://" .. item_value .. "%.tumblr%.com/.*%?route=")
or string.match(url, "^https?://" .. item_value .. "%.tumblr%.com/[^/]+%%") then
return false
end

Expand Down Expand Up @@ -117,10 +118,21 @@ wget.callbacks.download_child_p = function(urlpos, parent, depth, start_url_pars
local url = urlpos["url"]["url"]
local html = urlpos["link_expect_html"]

if string.find(url, "code%.jquery%.com") then
-- Ignore code.jquery.com
return false
end

if string.find(url, "fonts%.googleapis%.com") then
-- Ignore fonts.googleapis.com
return false
end

if string.find(url, "px.srvcs.tumblr.com") then
-- Ignore px.srvcs.tumblr.com tracking domain
return false
end

if string.match(url, "^https?://www.tumblr.com/oembed/1.0")
or string.match(url, "^https?://[0-9]+%.media%.tumblr%.com/avatar_[a-zA-Z0-9]+_64%.pnj")
or string.match(url, "^https?://[0-9]+%.media%.tumblr%.com/avatar_[a-zA-Z0-9]+_64%.gif")
Expand Down