This commit is contained in:
@@ -98,6 +98,8 @@ class WarosuThreadExtractor(Extractor):
|
||||
if url:
|
||||
if url[0] == "/":
|
||||
data["image"] = self.root + url
|
||||
elif "warosu." not in url:
|
||||
return False
|
||||
else:
|
||||
data["image"] = url
|
||||
return True
|
||||
|
||||
@@ -91,4 +91,12 @@ __tests__ = (
|
||||
"w" : range(200, 3000),
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://warosu.org/fa/thread/18460691",
|
||||
"#comment" : "non-archived post (#7698)",
|
||||
"#class" : warosu.WarosuThreadExtractor,
|
||||
"#pattern" : r"https://i.warosu.org/data/fa/img/0184/60/17\d+\.\w+",
|
||||
"#count" : 20,
|
||||
},
|
||||
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user