mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[fallenangels] add manga extractor
This commit is contained in:
parent
f226417420
commit
832a4a8ee9
@ -23,7 +23,7 @@ Supported Sites
|
||||
+-------------------+---------------------------------------+----------------------------------------------------------+
|
||||
|ExHentai |https://exhentai.org/ |Galleries |
|
||||
+-------------------+---------------------------------------+----------------------------------------------------------+
|
||||
|Fallen Angels Scans|https://fascans.com/ |Chapters |
|
||||
|Fallen Angels Scans|https://www.fascans.com/ |Chapters, Manga |
|
||||
+-------------------+---------------------------------------+----------------------------------------------------------+
|
||||
|Gelbooru |https://gelbooru.com/ |Posts, Tag-Searches |
|
||||
+-------------------+---------------------------------------+----------------------------------------------------------+
|
||||
|
@ -6,10 +6,11 @@
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
"""Extract manga-chapters from https://fascans.com/"""
|
||||
"""Extract manga-chapters from https://www.fascans.com/"""
|
||||
|
||||
from .common import Extractor, Message
|
||||
from .common import Extractor, MangaExtractor, Message
|
||||
from .. import text, util
|
||||
import re
|
||||
import json
|
||||
|
||||
|
||||
@ -66,3 +67,22 @@ class FallenangelsChapterExtractor(Extractor):
|
||||
def get_images(page):
|
||||
"""Return a list of all images in this chapter"""
|
||||
return json.loads(text.extract(page, "var pages = ", ";")[0])
|
||||
|
||||
|
||||
class FallenangelsMangaExtractor(MangaExtractor):
|
||||
"""Extractor for manga from fascans.com"""
|
||||
category = "fallenangels"
|
||||
pattern = [r"(?:https?://)?((manga|truyen)\.fascans\.com/manga/[^/]+)/?$"]
|
||||
scheme = "https"
|
||||
test = [
|
||||
("http://manga.fascans.com/manga/trinity-seven", {
|
||||
"url": "8da3d4bcbadc173e5b23c141a0e646b35f41b9b0",
|
||||
}),
|
||||
("https://truyen.fascans.com/manga/rakudai-kishi-no-eiyuutan", {
|
||||
"url": "d332d08ce522c7943cd80d3fd361391190444a26",
|
||||
}),
|
||||
]
|
||||
|
||||
def chapters(self, page):
|
||||
pattern = r'<h3 class="chapter-title-rtl">\s+<a href="([^"]+)"'
|
||||
return re.findall(pattern, page)
|
||||
|
Loading…
Reference in New Issue
Block a user