[shimmie2] support 'soybooru.com' (#8467)
This commit is contained in:
@@ -25,6 +25,8 @@ class Shimmie2Extractor(BaseExtractor):
|
||||
|
||||
if file_url := self.config_instance("file_url"):
|
||||
self.file_url_fmt = file_url
|
||||
if quote := self.config_instance("quote"):
|
||||
self._quote_type = lambda _: quote
|
||||
|
||||
def items(self):
|
||||
data = self.metadata()
|
||||
@@ -85,6 +87,11 @@ BASE_PATTERN = Shimmie2Extractor.update({
|
||||
"root": "https://co.llection.pics",
|
||||
"pattern": r"co\.llection\.pics",
|
||||
},
|
||||
"soybooru": {
|
||||
"root": "https://soybooru.com",
|
||||
"pattern": r"soybooru\.com",
|
||||
"quote": "'",
|
||||
},
|
||||
}) + r"/(?:index\.php\?q=/?)?"
|
||||
|
||||
|
||||
@@ -150,9 +157,8 @@ class Shimmie2TagExtractor(Shimmie2Extractor):
|
||||
}
|
||||
|
||||
pnum += 1
|
||||
if not extr(">Next<", ">"):
|
||||
if not extr(f"/{pnum}'>{pnum}<", ">"):
|
||||
return
|
||||
if not extr(f"/{pnum}{quote}>Next</", ">"):
|
||||
return
|
||||
|
||||
|
||||
class Shimmie2PostExtractor(Shimmie2Extractor):
|
||||
|
||||
Reference in New Issue
Block a user