mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[warosu] fix file URLs
This commit is contained in:
parent
645b4627ef
commit
f9dac43be9
@ -90,4 +90,7 @@ class WarosuThreadExtractor(Extractor):
|
||||
data["filename"] = text.unquote(extr(
|
||||
"", "<").rstrip().rpartition(".")[0])
|
||||
extr("<br>", "")
|
||||
data["image"] = self.root + extr("<a href=", ">")
|
||||
|
||||
data["image"] = url = extr("<a href=", ">")
|
||||
if url[0] == "/":
|
||||
data["image"] = self.root + url
|
||||
|
@ -13,17 +13,17 @@ __tests__ = (
|
||||
"#category": ("", "warosu", "thread"),
|
||||
"#class" : warosu.WarosuThreadExtractor,
|
||||
"#urls" : (
|
||||
"https://warosu.org/data/jp/img/0166/56/1488487280004.png",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488493239417.png",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488493636725.jpg",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488493700040.jpg",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488499585168.jpg",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488530851199.jpg",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488536072155.jpg",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488603426484.png",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488647021253.jpg",
|
||||
"https://warosu.org/data/jp/img/0166/56/1488866825031.jpg",
|
||||
"https://warosu.org/data/jp/img/0166/56/1489094956868.jpg",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488487280004.png",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488493239417.png",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488493636725.jpg",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488493700040.jpg",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488499585168.jpg",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488530851199.jpg",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488536072155.jpg",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488603426484.png",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488647021253.jpg",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1488866825031.jpg",
|
||||
"https://i.warosu.org/data/jp/img/0166/56/1489094956868.jpg",
|
||||
),
|
||||
},
|
||||
|
||||
@ -32,7 +32,7 @@ __tests__ = (
|
||||
"#category": ("", "warosu", "thread"),
|
||||
"#class" : warosu.WarosuThreadExtractor,
|
||||
"#sha1_content" : "d48df0a701e6599312bfff8674f4aa5d4fb8db1c",
|
||||
"#urls" : "https://warosu.org/data/jp/img/0166/58/1488521824388.jpg",
|
||||
"#urls" : "https://i.warosu.org/data/jp/img/0166/58/1488521824388.jpg",
|
||||
"#count" : 1,
|
||||
|
||||
"board" : "jp",
|
||||
@ -43,7 +43,7 @@ __tests__ = (
|
||||
"filename" : "sadako-vs-kayako-movie-review",
|
||||
"fsize" : "55 KB",
|
||||
"h" : 675,
|
||||
"image" : "https://warosu.org/data/jp/img/0166/58/1488521824388.jpg",
|
||||
"image" : "https://i.warosu.org/data/jp/img/0166/58/1488521824388.jpg",
|
||||
"name" : "Anonymous",
|
||||
"no" : 16658073,
|
||||
"now" : "Fri Mar 3 01:17:04 2017",
|
||||
@ -58,7 +58,7 @@ __tests__ = (
|
||||
"#url" : "https://warosu.org/ic/thread/4604652",
|
||||
"#category": ("", "warosu", "thread"),
|
||||
"#class" : warosu.WarosuThreadExtractor,
|
||||
"#pattern" : r"https://warosu\.org/data/ic/img/0046/04/1590\d{9}\.jpg",
|
||||
"#pattern" : r"https://i.warosu\.org/data/ic/img/0046/04/1590\d{9}\.jpg",
|
||||
"#count" : 133,
|
||||
|
||||
"board" : "ic",
|
||||
@ -68,7 +68,7 @@ __tests__ = (
|
||||
"filename" : str,
|
||||
"fsize" : str,
|
||||
"h" : range(200, 3507),
|
||||
"image" : r"re:https://warosu\.org/data/ic/img/0046/04/1590\d+\.jpg",
|
||||
"image" : r"re:https://i.warosu\.org/data/ic/img/0046/04/1590\d+\.jpg",
|
||||
"name" : "re:Anonymous|Dhe Specky Spider-Man",
|
||||
"no" : range(4604652, 4620000),
|
||||
"now" : r"re:\w\w\w \w\w\w \d\d \d\d:\d\d:\d\d 2020",
|
||||
|
Loading…
Reference in New Issue
Block a user