Version 20210330.03. Unescape unicode characters. Do not HLS for video.

pull/10/head
arkiver 3 years ago
parent ad04f45d4f
commit ce7fff480d

@ -60,7 +60,7 @@ if not WGET_AT:
#
# Update this each time you make a non-cosmetic change.
# It will be added to the WARC files and reported to the tracker.
VERSION = '20210330.02'
VERSION = '20210330.03'
TRACKER_ID = 'reddit'
TRACKER_HOST = 'legacy-api.arpa.li'
MULTI_ITEM_SIZE = 20

@ -121,6 +121,10 @@ allowed = function(url, parenturl)
parenturl
and string.match(url, "^https?://amp%.reddit%.com/")
)
or (
parenturl
and string.match(url, "^https?://v%.redd%.it/[^/]+/HLSPlaylist%.m3u8")
)
or (
item_type == "post"
and (
@ -239,6 +243,18 @@ wget.callbacks.get_urls = function(file, url, is_css, iri)
local origurl = url
local url = string.match(urla, "^([^#]+)")
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_, "&amp;") do
url_ = string.gsub(url_, "&amp;", "&")
end

Loading…
Cancel
Save