Skip to content

Commit

Permalink
[dynastyscans] add 'manga' extractor (closes #2035)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Nov 19, 2021
1 parent 9bc83af commit 3a7a19c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
18 changes: 17 additions & 1 deletion gallery_dl/extractor/dynastyscans.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -89,6 +89,22 @@ def images(self, page):
]


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"
Expand Down

0 comments on commit 3a7a19c

Please sign in to comment.