[lensdump] recognize direct image links (#5293
This commit is contained in:
@@ -104,7 +104,7 @@ class LensdumpImageExtractor(LensdumpBase, Extractor):
|
|||||||
filename_fmt = "{category}_{id}{title:?_//}.{extension}"
|
filename_fmt = "{category}_{id}{title:?_//}.{extension}"
|
||||||
directory_fmt = ("{category}",)
|
directory_fmt = ("{category}",)
|
||||||
archive_fmt = "{id}"
|
archive_fmt = "{id}"
|
||||||
pattern = BASE_PATTERN + r"/i/(\w+)"
|
pattern = r"(?:https?://)?(?:lensdump\.com|\w\.l3n\.co)/i/(\w+)"
|
||||||
example = "https://lensdump.com/i/ID"
|
example = "https://lensdump.com/i/ID"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ __tests__ = (
|
|||||||
"#url" : "https://lensdump.com/i/tyoAyM",
|
"#url" : "https://lensdump.com/i/tyoAyM",
|
||||||
"#category": ("", "lensdump", "image"),
|
"#category": ("", "lensdump", "image"),
|
||||||
"#class" : lensdump.LensdumpImageExtractor,
|
"#class" : lensdump.LensdumpImageExtractor,
|
||||||
"#pattern" : r"https://c\.l3n\.co/i/tyoAyM\.webp",
|
"#urls" : "https://c.l3n.co/i/tyoAyM.webp",
|
||||||
"#sha1_content": "1aa749ed2c0cf679ec8e1df60068edaf3875de46",
|
"#sha1_content": "1aa749ed2c0cf679ec8e1df60068edaf3875de46",
|
||||||
|
|
||||||
"date" : "dt:2022-08-01 08:24:28",
|
"date" : "dt:2022-08-01 08:24:28",
|
||||||
@@ -45,4 +45,20 @@ __tests__ = (
|
|||||||
"width" : 620,
|
"width" : 620,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://c.l3n.co/i/tyoAyM.webp",
|
||||||
|
"#category": ("", "lensdump", "image"),
|
||||||
|
"#class" : lensdump.LensdumpImageExtractor,
|
||||||
|
"#urls" : "https://c.l3n.co/i/tyoAyM.webp",
|
||||||
|
|
||||||
|
"date" : "dt:2022-08-01 08:24:28",
|
||||||
|
"extension": "webp",
|
||||||
|
"filename" : "tyoAyM",
|
||||||
|
"height" : 400,
|
||||||
|
"id" : "tyoAyM",
|
||||||
|
"title" : "MYOBI clovis bookcaseset",
|
||||||
|
"url" : "https://c.l3n.co/i/tyoAyM.webp",
|
||||||
|
"width" : 620,
|
||||||
|
},
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user