|
|
@ -121,6 +121,10 @@ allowed = function(url, parenturl)
|
|
|
|
parenturl
|
|
|
|
parenturl
|
|
|
|
and string.match(url, "^https?://amp%.reddit%.com/")
|
|
|
|
and string.match(url, "^https?://amp%.reddit%.com/")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
or (
|
|
|
|
|
|
|
|
parenturl
|
|
|
|
|
|
|
|
and string.match(url, "^https?://v%.redd%.it/[^/]+/HLSPlaylist%.m3u8")
|
|
|
|
|
|
|
|
)
|
|
|
|
or (
|
|
|
|
or (
|
|
|
|
item_type == "post"
|
|
|
|
item_type == "post"
|
|
|
|
and (
|
|
|
|
and (
|
|
|
@ -239,6 +243,18 @@ wget.callbacks.get_urls = function(file, url, is_css, iri)
|
|
|
|
local origurl = url
|
|
|
|
local origurl = url
|
|
|
|
local url = string.match(urla, "^([^#]+)")
|
|
|
|
local url = string.match(urla, "^([^#]+)")
|
|
|
|
local url_ = string.match(url, "^(.-)%.?$")
|
|
|
|
local url_ = string.match(url, "^(.-)%.?$")
|
|
|
|
|
|
|
|
url_ = string.gsub(
|
|
|
|
|
|
|
|
url_, "\\[uU]([0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])",
|
|
|
|
|
|
|
|
function (s)
|
|
|
|
|
|
|
|
local i = tonumber(s, 16)
|
|
|
|
|
|
|
|
if i < 128 then
|
|
|
|
|
|
|
|
return string.char(i)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
-- should not have these
|
|
|
|
|
|
|
|
abort_item()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
)
|
|
|
|
while string.find(url_, "&") do
|
|
|
|
while string.find(url_, "&") do
|
|
|
|
url_ = string.gsub(url_, "&", "&")
|
|
|
|
url_ = string.gsub(url_, "&", "&")
|
|
|
|
end
|
|
|
|
end
|
|
|
|