[dynastyscans] add 'manga' extractor (closes #2035)
This commit is contained in:
@@ -136,7 +136,7 @@ Consider all sites to be NSFW unless otherwise known.
|
||||
<tr>
|
||||
<td>Dynasty Reader</td>
|
||||
<td>https://dynasty-scans.com/</td>
|
||||
<td>Chapters, individual Images, Search Results</td>
|
||||
<td>Chapters, individual Images, Manga, Search Results</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
"""Extractors for https://dynasty-scans.com/"""
|
||||
|
||||
from .common import ChapterExtractor, Extractor, Message
|
||||
from .common import ChapterExtractor, MangaExtractor, Extractor, Message
|
||||
from .. import text
|
||||
import json
|
||||
import re
|
||||
@@ -89,6 +89,22 @@ class DynastyscansChapterExtractor(DynastyscansBase, ChapterExtractor):
|
||||
]
|
||||
|
||||
|
||||
class DynastyscansMangaExtractor(DynastyscansBase, MangaExtractor):
|
||||
chapterclass = DynastyscansChapterExtractor
|
||||
reverse = False
|
||||
pattern = BASE_PATTERN + r"(/series/[^/?#]+)"
|
||||
test = ("https://dynasty-scans.com/series/hitoribocchi_no_oo_seikatsu", {
|
||||
"pattern": DynastyscansChapterExtractor.pattern,
|
||||
"count": ">= 100",
|
||||
})
|
||||
|
||||
def chapters(self, page):
|
||||
return [
|
||||
(self.root + path, {})
|
||||
for path in text.extract_iter(page, '<dd>\n<a href="', '"')
|
||||
]
|
||||
|
||||
|
||||
class DynastyscansSearchExtractor(DynastyscansBase, Extractor):
|
||||
"""Extrator for image search results on dynasty-scans.com"""
|
||||
subcategory = "search"
|
||||
|
||||
Reference in New Issue
Block a user