[manganelo] update domain to 'manganato.com'
This commit is contained in:
@@ -422,8 +422,8 @@ Consider all sites to be NSFW unless otherwise known.
|
|||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Manganelo</td>
|
<td>Manganato</td>
|
||||||
<td>https://manganelo.com/</td>
|
<td>https://manganato.com/</td>
|
||||||
<td>Chapters, Manga</td>
|
<td>Chapters, Manga</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -4,35 +4,23 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
"""Extract manga-chapters and entire manga from https://manganelo.com/"""
|
"""Extractors for https://manganato.com/"""
|
||||||
|
|
||||||
from .common import ChapterExtractor, MangaExtractor
|
from .common import ChapterExtractor, MangaExtractor
|
||||||
from .. import text
|
from .. import text
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
BASE_PATTERN = \
|
||||||
class ManganeloBase():
|
r"(?:https?://)?((?:(?:read)?manganato|(?:www\.)?manganelo)\.com)"
|
||||||
"""Base class for manganelo extractors"""
|
|
||||||
category = "manganelo"
|
|
||||||
root = "https://manganelo.com"
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def parse_page(page, data):
|
|
||||||
"""Parse metadata on 'page' and add it to 'data'"""
|
|
||||||
text.extract_all(page, (
|
|
||||||
("manga" , '<h1>', '</h1>'),
|
|
||||||
('author' , '</i>Author(s) :</td>', '</tr>'),
|
|
||||||
), values=data)
|
|
||||||
data["author"] = text.remove_html(data["author"])
|
|
||||||
return data
|
|
||||||
|
|
||||||
|
|
||||||
class ManganeloChapterExtractor(ManganeloBase, ChapterExtractor):
|
class ManganeloChapterExtractor(ChapterExtractor):
|
||||||
"""Extractor for manga-chapters from manganelo.com"""
|
"""Extractor for manga-chapters from manganelo.com"""
|
||||||
pattern = (r"(?:https?://)?(?:www\.)?manganelo\.com"
|
category = "manganelo"
|
||||||
r"(/chapter/\w+/chapter_[^/?#]+)")
|
root = "https://readmanganato.com"
|
||||||
|
pattern = BASE_PATTERN + r"(/(?:manga-\w+|chapter/\w+)/chapter[-_][^/?#]+)"
|
||||||
test = (
|
test = (
|
||||||
("https://manganelo.com/chapter/gq921227/chapter_23", {
|
("https://readmanganato.com/manga-gn983696/chapter-23", {
|
||||||
"pattern": r"https://s\d+\.\w+\.com/mangakakalot/g\d+/gq921227/"
|
"pattern": r"https://s\d+\.\w+\.com/mangakakalot/g\d+/gq921227/"
|
||||||
r"vol3_chapter_23_24_yen/\d+\.jpg",
|
r"vol3_chapter_23_24_yen/\d+\.jpg",
|
||||||
"keyword": "3748087cf41abc97f991530e6fd53b291490d6d0",
|
"keyword": "3748087cf41abc97f991530e6fd53b291490d6d0",
|
||||||
@@ -43,11 +31,12 @@ class ManganeloChapterExtractor(ManganeloBase, ChapterExtractor):
|
|||||||
"content": "fbec629c71f66b246bfa0604204407c0d1c8ae38",
|
"content": "fbec629c71f66b246bfa0604204407c0d1c8ae38",
|
||||||
"count": 39,
|
"count": 39,
|
||||||
}),
|
}),
|
||||||
|
("https://manganelo.com/chapter/gq921227/chapter_23"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
self.path = match.group(1)
|
domain, path = match.groups()
|
||||||
ChapterExtractor.__init__(self, match, self.root + self.path)
|
ChapterExtractor.__init__(self, match, "https://" + domain + path)
|
||||||
self.session.headers['Referer'] = self.root
|
self.session.headers['Referer'] = self.root
|
||||||
|
|
||||||
def metadata(self, page):
|
def metadata(self, page):
|
||||||
@@ -85,13 +74,14 @@ class ManganeloChapterExtractor(ManganeloBase, ChapterExtractor):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class ManganeloMangaExtractor(ManganeloBase, MangaExtractor):
|
class ManganeloMangaExtractor(MangaExtractor):
|
||||||
"""Extractor for manga from manganelo.com"""
|
"""Extractor for manga from manganelo.com"""
|
||||||
|
category = "manganelo"
|
||||||
|
root = "https://readmanganato.com"
|
||||||
chapterclass = ManganeloChapterExtractor
|
chapterclass = ManganeloChapterExtractor
|
||||||
pattern = (r"(?:https?://)?(?:www\.)?manganelo\.com"
|
pattern = BASE_PATTERN + r"(/(?:manga[-/]|read_)\w+)/?$"
|
||||||
r"(/(?:manga/|read_)\w+)")
|
|
||||||
test = (
|
test = (
|
||||||
("https://manganelo.com/manga/ol921234", {
|
("https://manganato.com/manga-gu983703", {
|
||||||
"pattern": ManganeloChapterExtractor.pattern,
|
"pattern": ManganeloChapterExtractor.pattern,
|
||||||
"count": ">= 70",
|
"count": ">= 70",
|
||||||
}),
|
}),
|
||||||
@@ -99,8 +89,14 @@ class ManganeloMangaExtractor(ManganeloBase, MangaExtractor):
|
|||||||
"pattern": ManganeloChapterExtractor.pattern,
|
"pattern": ManganeloChapterExtractor.pattern,
|
||||||
"count": ">= 40",
|
"count": ">= 40",
|
||||||
}),
|
}),
|
||||||
|
("https://manganelo.com/manga/ol921234/"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __init__(self, match):
|
||||||
|
domain, path = match.groups()
|
||||||
|
MangaExtractor.__init__(self, match, "https://" + domain + path)
|
||||||
|
self.session.headers['Referer'] = self.root
|
||||||
|
|
||||||
def chapters(self, page):
|
def chapters(self, page):
|
||||||
results = []
|
results = []
|
||||||
data = self.parse_page(page, {"lang": "en", "language": "English"})
|
data = self.parse_page(page, {"lang": "en", "language": "English"})
|
||||||
@@ -118,3 +114,13 @@ class ManganeloMangaExtractor(ManganeloBase, MangaExtractor):
|
|||||||
data["chapter"] = text.parse_int(chapter)
|
data["chapter"] = text.parse_int(chapter)
|
||||||
data["chapter_minor"] = sep + minor
|
data["chapter_minor"] = sep + minor
|
||||||
results.append((url, data.copy()))
|
results.append((url, data.copy()))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def parse_page(page, data):
|
||||||
|
"""Parse metadata on 'page' and add it to 'data'"""
|
||||||
|
text.extract_all(page, (
|
||||||
|
("manga" , '<h1>', '</h1>'),
|
||||||
|
('author' , '</i>Author(s) :</td>', '</tr>'),
|
||||||
|
), values=data)
|
||||||
|
data["author"] = text.remove_html(data["author"])
|
||||||
|
return data
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ CATEGORY_MAP = {
|
|||||||
"mangafox" : "Manga Fox",
|
"mangafox" : "Manga Fox",
|
||||||
"mangahere" : "Manga Here",
|
"mangahere" : "Manga Here",
|
||||||
"mangakakalot" : "MangaKakalot",
|
"mangakakalot" : "MangaKakalot",
|
||||||
|
"manganelo" : "Manganato",
|
||||||
"mangapark" : "MangaPark",
|
"mangapark" : "MangaPark",
|
||||||
"mangastream" : "Manga Stream",
|
"mangastream" : "Manga Stream",
|
||||||
"mastodon.social": "mastodon.social",
|
"mastodon.social": "mastodon.social",
|
||||||
|
|||||||
Reference in New Issue
Block a user