[mangasee] add support for 'mangalife' (#3086)
This commit is contained in:
@@ -493,6 +493,12 @@ Consider all sites to be NSFW unless otherwise known.
|
|||||||
<td>Chapters, Manga</td>
|
<td>Chapters, Manga</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>MangaLife</td>
|
||||||
|
<td>https://manga4life.com/</td>
|
||||||
|
<td>Chapters, Manga</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Manganato</td>
|
<td>Manganato</td>
|
||||||
<td>https://manganato.com/</td>
|
<td>https://manganato.com/</td>
|
||||||
|
|||||||
@@ -35,33 +35,59 @@ class MangaseeBase():
|
|||||||
|
|
||||||
|
|
||||||
class MangaseeChapterExtractor(MangaseeBase, ChapterExtractor):
|
class MangaseeChapterExtractor(MangaseeBase, ChapterExtractor):
|
||||||
pattern = r"(?:https?://)?mangasee123\.com(/read-online/[^/?#]+\.html)"
|
pattern = (r"(?:https?://)?(mangasee123|manga4life)\.com"
|
||||||
test = (("https://mangasee123.com/read-online"
|
r"(/read-online/[^/?#]+\.html)")
|
||||||
"/Tokyo-Innocent-chapter-4.5-page-1.html"), {
|
test = (
|
||||||
"pattern": r"https://[^/]+/manga/Tokyo-Innocent/0004\.5-00\d\.png",
|
(("https://mangasee123.com/read-online"
|
||||||
"count": 8,
|
"/Tokyo-Innocent-chapter-4.5-page-1.html"), {
|
||||||
"keyword": {
|
"pattern": r"https://[^/]+/manga/Tokyo-Innocent/0004\.5-00\d\.png",
|
||||||
"chapter": 4,
|
|
||||||
"chapter_minor": ".5",
|
|
||||||
"chapter_string": "100045",
|
|
||||||
"count": 8,
|
"count": 8,
|
||||||
"date": "dt:2020-01-20 21:52:53",
|
"keyword": {
|
||||||
"extension": "png",
|
"chapter": 4,
|
||||||
"filename": r"re:0004\.5-00\d",
|
"chapter_minor": ".5",
|
||||||
"index": "1",
|
"chapter_string": "100045",
|
||||||
"lang": "en",
|
"count": 8,
|
||||||
"language": "English",
|
"date": "dt:2020-01-20 21:52:53",
|
||||||
"manga": "Tokyo Innocent",
|
"extension": "png",
|
||||||
"page": int,
|
"filename": r"re:0004\.5-00\d",
|
||||||
"title": "",
|
"index": "1",
|
||||||
},
|
"lang": "en",
|
||||||
})
|
"language": "English",
|
||||||
|
"manga": "Tokyo Innocent",
|
||||||
|
"page": int,
|
||||||
|
"title": "",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
(("https://manga4life.com/read-online"
|
||||||
|
"/One-Piece-chapter-1063-page-1.html"), {
|
||||||
|
"pattern": r"https://[^/]+/manga/One-Piece/1063-0\d\d\.png",
|
||||||
|
"count": 13,
|
||||||
|
"keyword": {
|
||||||
|
"chapter": 1063,
|
||||||
|
"chapter_minor": "",
|
||||||
|
"chapter_string": "110630",
|
||||||
|
"count": 13,
|
||||||
|
"date": "dt:2022-10-16 17:32:54",
|
||||||
|
"extension": "png",
|
||||||
|
"filename": r"re:1063-0\d\d",
|
||||||
|
"index": "1",
|
||||||
|
"lang": "en",
|
||||||
|
"language": "English",
|
||||||
|
"manga": "One Piece",
|
||||||
|
"page": int,
|
||||||
|
"title": "",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
ChapterExtractor.__init__(self, match)
|
if match.group(1) == "manga4life":
|
||||||
|
self.category = "mangalife"
|
||||||
|
self.root = "https://manga4life.com"
|
||||||
|
ChapterExtractor.__init__(self, match, self.root + match.group(2))
|
||||||
self.session.headers["Referer"] = self.gallery_url
|
self.session.headers["Referer"] = self.gallery_url
|
||||||
|
|
||||||
domain = "mangasee123.com"
|
domain = self.root.rpartition("/")[2]
|
||||||
cookies = self.session.cookies
|
cookies = self.session.cookies
|
||||||
if not cookies.get("PHPSESSID", domain=domain):
|
if not cookies.get("PHPSESSID", domain=domain):
|
||||||
cookies.set("PHPSESSID", util.generate_token(13), domain=domain)
|
cookies.set("PHPSESSID", util.generate_token(13), domain=domain)
|
||||||
@@ -96,12 +122,24 @@ class MangaseeChapterExtractor(MangaseeBase, ChapterExtractor):
|
|||||||
|
|
||||||
class MangaseeMangaExtractor(MangaseeBase, MangaExtractor):
|
class MangaseeMangaExtractor(MangaseeBase, MangaExtractor):
|
||||||
chapterclass = MangaseeChapterExtractor
|
chapterclass = MangaseeChapterExtractor
|
||||||
pattern = r"(?:https?://)?mangasee123\.com(/manga/[^/?#]+)"
|
pattern = r"(?:https?://)?(mangasee123|manga4life)\.com(/manga/[^/?#]+)"
|
||||||
test = (("https://mangasee123.com/manga"
|
test = (
|
||||||
"/Nakamura-Koedo-To-Daizu-Keisuke-Wa-Umaku-Ikanai"), {
|
(("https://mangasee123.com/manga"
|
||||||
"pattern": MangaseeChapterExtractor.pattern,
|
"/Nakamura-Koedo-To-Daizu-Keisuke-Wa-Umaku-Ikanai"), {
|
||||||
"count": ">= 17",
|
"pattern": MangaseeChapterExtractor.pattern,
|
||||||
})
|
"count": ">= 17",
|
||||||
|
}),
|
||||||
|
("https://manga4life.com/manga/Ano-Musume-Ni-Kiss-To-Shirayuri-O", {
|
||||||
|
"pattern": MangaseeChapterExtractor.pattern,
|
||||||
|
"count": ">= 50",
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
def __init__(self, match):
|
||||||
|
if match.group(1) == "manga4life":
|
||||||
|
self.category = "mangalife"
|
||||||
|
self.root = "https://manga4life.com"
|
||||||
|
MangaExtractor.__init__(self, match, self.root + match.group(2))
|
||||||
|
|
||||||
def chapters(self, page):
|
def chapters(self, page):
|
||||||
slug, pos = text.extract(page, 'vm.IndexName = "', '"')
|
slug, pos = text.extract(page, 'vm.IndexName = "', '"')
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ CATEGORY_MAP = {
|
|||||||
"mangafox" : "Manga Fox",
|
"mangafox" : "Manga Fox",
|
||||||
"mangahere" : "Manga Here",
|
"mangahere" : "Manga Here",
|
||||||
"mangakakalot" : "MangaKakalot",
|
"mangakakalot" : "MangaKakalot",
|
||||||
|
"mangalife" : "MangaLife",
|
||||||
"manganelo" : "Manganato",
|
"manganelo" : "Manganato",
|
||||||
"mangapark" : "MangaPark",
|
"mangapark" : "MangaPark",
|
||||||
"mangasee" : "MangaSee",
|
"mangasee" : "MangaSee",
|
||||||
@@ -425,6 +426,10 @@ def build_extractor_list():
|
|||||||
default["pornimagesxxx"] = default["hentaicosplays"]
|
default["pornimagesxxx"] = default["hentaicosplays"]
|
||||||
domains["pornimagesxxx"] = "https://porn-images-xxx.com/"
|
domains["pornimagesxxx"] = "https://porn-images-xxx.com/"
|
||||||
|
|
||||||
|
# add manga4life.com
|
||||||
|
default["mangalife"] = default["mangasee"]
|
||||||
|
domains["mangalife"] = "https://manga4life.com/"
|
||||||
|
|
||||||
return categories, domains
|
return categories, domains
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user