Module:Webarchive: திருத்தங்களுக்கு இடையிலான வேறுபாடு
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
add webrecorder.io |
Extract date from URL for Library of Congress Web Archives (webarchive.loc.gov/all/YYYYMMMDDhhmmss/), same as with Wayback. Tested first with /sandbox, Module:Webarchive/testcases, and Template:Webarchive/testcases/Production. |
||
வரிசை 262:
Given a URI-path to Wayback (eg. /web/20160901010101/http://example.com )
or Library of Congress Web Archives (/all/20160901010101/http://example.com)
return the formatted date eg. "September 1, 2016" in df format
Handle non-digits in snapshot ID such as "re_" and "-" and "*"
வரி 272 ⟶ 273:
local safe = path
snapdate = string.gsub(safe, "^/all/", "") -- Remove leading "/all/"
safe = snapdate
snapdate = string.gsub(safe, "^/w?e?b?/?", "") -- Remove leading "/web/" or "/"
safe = snapdate
local N = mw.text.split(safe, "/")
snapdate = N[1]
if snapdate == "*" then -- eg. /web/*/http.. or /all/*/http..
return "index"
end
வரி 436 ⟶ 439:
elseif mw.ustring.find( host, "arquivo.pt", 1, plain) then
ulx.url1.tail = " at the " .. "Portuguese Web Archive"
elseif mw.ustring.find( host, "webarchive.loc.gov", 1, plain ) then
ulx.url1.service = "locwebarchives"
ulx.url1.tail = " at the " .. bracketopen .. "Library of Congress" .. bracketclose .. " Web Archives"
elseif mw.ustring.find( host, "loc.gov", 1, plain ) then
ulx.url1.tail = " at the " .. bracketopen .. "Library of Congress" .. bracketclose
வரி 704 ⟶ 710:
local date = trimArg(args.date) or trimArg(args.date1)
if date == "*" and (ulx.url1.service == "wayback" or ulx.url1.service == "locwebarchives") then
date = "index"
elseif date and (ulx.url1.service == "wayback" or ulx.url1.service == "locwebarchives") and verifydates == "yes" then
local ldf = dateFormat(date)
if ldf then
வரி 732 ⟶ 738:
end
end
elseif not date and (ulx.url1.service == "wayback" or ulx.url1.service == "locwebarchives") then
date = decodeWaybackDate( uri1.path, "iso" )
if not date then
| |||