[mangasee] remove module

This commit is contained in:
Mike Fährmann
2025-05-30 18:04:55 +02:00
parent 783f1c1b11
commit ec523c2c2c
7 changed files with 1 additions and 275 deletions

View File

@@ -684,7 +684,7 @@ extractor.*.browser
Type
``string``
Default
* ``"firefox"``: ``artstation``, ``fanbox``, ``mangasee``, ``twitter``
* ``"firefox"``: ``artstation``, ``fanbox``, ``twitter``
* ``null``: otherwise
Example
* ``"chrome:macos"``

View File

@@ -565,12 +565,6 @@ Consider all listed sites to potentially be NSFW.
<td>Authors, Chapters, Updates Feed, Library, MDLists, Manga</td>
<td>Supported</td>
</tr>
<tr>
<td>MangaLife</td>
<td>https://manga4life.com/</td>
<td>Chapters, Manga</td>
<td></td>
</tr>
<tr>
<td>MangaPark</td>
<td>https://mangapark.net/</td>
@@ -583,12 +577,6 @@ Consider all listed sites to potentially be NSFW.
<td>Chapters, Manga</td>
<td></td>
</tr>
<tr>
<td>MangaSee</td>
<td>https://mangasee123.com/</td>
<td>Chapters, Manga</td>
<td></td>
</tr>
<tr>
<td>Mangoxo</td>
<td>https://www.mangoxo.com/</td>

View File

@@ -107,7 +107,6 @@ modules = [
"manganelo",
"mangapark",
"mangaread",
"mangasee",
"mangoxo",
"misskey",
"motherless",

View File

@@ -1,117 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2021-2023 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Extractors for https://mangasee123.com/"""
from .common import ChapterExtractor, MangaExtractor
from .. import text, util
class MangaseeBase():
category = "mangasee"
browser = "firefox"
root = "https://mangasee123.com"
@staticmethod
def _transform_chapter(data):
chapter = data["Chapter"]
return {
"title" : data["ChapterName"] or "",
"index" : chapter[0],
"chapter" : int(chapter[1:-1]),
"chapter_minor": "" if chapter[-1] == "0" else "." + chapter[-1],
"chapter_string": chapter,
"lang" : "en",
"language": "English",
"date" : text.parse_datetime(
data["Date"], "%Y-%m-%d %H:%M:%S"),
}
class MangaseeChapterExtractor(MangaseeBase, ChapterExtractor):
pattern = (r"(?:https?://)?(mangasee123|manga4life)\.com"
r"(/read-online/[^/?#]+\.html)")
example = "https://mangasee123.com/read-online/MANGA-chapter-1-page-1.html"
def __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))
def _init(self):
self.session.headers["Referer"] = self.gallery_url
domain = self.root.rpartition("/")[2]
cookies = self.cookies
if not cookies.get("PHPSESSID", domain=domain):
cookies.set("PHPSESSID", util.generate_token(13), domain=domain)
def metadata(self, page):
extr = text.extract_from(page)
author = util.json_loads(extr('"author":', '],') + "]")
genre = util.json_loads(extr('"genre":', '],') + "]")
self.chapter = data = util.json_loads(extr("vm.CurChapter =", ";\r\n"))
self.domain = extr('vm.CurPathName = "', '"')
self.slug = extr('vm.IndexName = "', '"')
data = self._transform_chapter(data)
data["manga"] = text.unescape(extr('vm.SeriesName = "', '"'))
data["author"] = author
data["genre"] = genre
return data
def images(self, page):
chapter = self.chapter["Chapter"][1:]
if chapter[-1] == "0":
chapter = chapter[:-1]
else:
chapter = chapter[:-1] + "." + chapter[-1]
base = "https://{}/manga/{}/".format(self.domain, self.slug)
if self.chapter["Directory"]:
base += self.chapter["Directory"] + "/"
base += chapter + "-"
return [
("{}{:>03}.png".format(base, i), None)
for i in range(1, int(self.chapter["Page"]) + 1)
]
class MangaseeMangaExtractor(MangaseeBase, MangaExtractor):
chapterclass = MangaseeChapterExtractor
pattern = r"(?:https?://)?(mangasee123|manga4life)\.com(/manga/[^/?#]+)"
example = "https://mangasee123.com/manga/MANGA"
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):
extr = text.extract_from(page)
author = util.json_loads(extr('"author":', '],') + "]")
genre = util.json_loads(extr('"genre":', '],') + "]")
slug = extr('vm.IndexName = "', '"')
chapters = util.json_loads(extr("vm.Chapters = ", ";\r\n"))
result = []
for data in map(self._transform_chapter, chapters):
url = "{}/read-online/{}-chapter-{}{}".format(
self.root, slug, data["chapter"], data["chapter_minor"])
if data["index"] != "1":
url += "-index-" + data["index"]
url += "-page-1.html"
data["manga"] = slug
data["author"] = author
data["genre"] = genre
result.append((url, data))
return result

View File

@@ -97,11 +97,9 @@ CATEGORY_MAP = {
"mangafox" : "Manga Fox",
"mangahere" : "Manga Here",
"mangakakalot" : "MangaKakalot",
"mangalife" : "MangaLife",
"manganato" : "MangaNato",
"mangapark" : "MangaPark",
"mangaread" : "MangaRead",
"mangasee" : "MangaSee",
"mariowiki" : "Super Mario Wiki",
"mastodon.social": "mastodon.social",
"mediawiki" : "MediaWiki",
@@ -603,10 +601,6 @@ def build_extractor_list():
default["coomer"] = default["kemono"]
domains["coomer"] = domains["kemono"].replace("kemono", "coomer")
# add manga4life.com
default["mangalife"] = default["mangasee"]
domains["mangalife"] = "https://manga4life.com/"
# add wikifeetx.com
default["wikifeetx"] = default["wikifeet"]
domains["wikifeetx"] = "https://www.wikifeetx.com/"

View File

@@ -1,69 +0,0 @@
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
from gallery_dl.extractor import mangasee
import datetime
__tests__ = (
{
"#url" : "https://manga4life.com/read-online/One-Piece-chapter-1063-page-1.html",
"#category": ("", "mangalife", "chapter"),
"#class" : mangasee.MangaseeChapterExtractor,
"#pattern" : r"https://[^/]+/manga/One-Piece/1063-0\d\d\.png",
"#count" : 13,
"author" : ["ODA Eiichiro"],
"chapter" : 1063,
"chapter_minor" : "",
"chapter_string": "110630",
"count" : 13,
"date" : "dt:2024-03-29 15:07:00",
"extension" : "png",
"filename" : r"re:1063-0\d\d",
"genre" : [
"Action",
"Adventure",
"Comedy",
"Drama",
"Fantasy",
"Shounen",
],
"index" : "1",
"lang" : "en",
"language" : "English",
"manga" : "One Piece",
"page" : int,
"title" : "",
},
{
"#url" : "https://manga4life.com/manga/Ano-Musume-Ni-Kiss-To-Shirayuri-O",
"#category": ("", "mangalife", "manga"),
"#class" : mangasee.MangaseeMangaExtractor,
"#pattern" : mangasee.MangaseeChapterExtractor.pattern,
"#count" : ">= 50",
"author" : ["Canno"],
"chapter" : int,
"chapter_minor" : r"re:^|\.5$",
"chapter_string": r"re:100\d\d\d",
"date" : datetime.datetime,
"genre" : [
"Comedy",
"Romance",
"School Life",
"Seinen",
"Shoujo Ai",
],
"index" : "1",
"lang" : "en",
"language" : "English",
"manga" : "Ano-Musume-Ni-Kiss-To-Shirayuri-O",
"title" : "",
},
)

View File

@@ -1,69 +0,0 @@
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
from gallery_dl.extractor import mangasee
import datetime
__tests__ = (
{
"#url" : "https://mangasee123.com/read-online/Tokyo-Innocent-chapter-4.5-page-1.html",
"#category": ("", "mangasee", "chapter"),
"#class" : mangasee.MangaseeChapterExtractor,
"#pattern" : r"https://[^/]+/manga/Tokyo-Innocent/0004\.5-00\d\.png",
"#count" : 8,
"author" : ["NARUMI Naru"],
"chapter" : 4,
"chapter_minor" : ".5",
"chapter_string": "100045",
"count" : 8,
"date" : "dt:2020-01-20 21:52:53",
"extension" : "png",
"filename" : r"re:0004\.5-00\d",
"genre" : [
"Comedy",
"Fantasy",
"Harem",
"Romance",
"Shounen",
"Supernatural",
],
"index" : "1",
"lang" : "en",
"language" : "English",
"manga" : "Tokyo Innocent",
"page" : int,
"title" : "",
},
{
"#url" : "https://mangasee123.com/manga/Nakamura-Koedo-To-Daizu-Keisuke-Wa-Umaku-Ikanai",
"#category": ("", "mangasee", "manga"),
"#class" : mangasee.MangaseeMangaExtractor,
"#pattern" : mangasee.MangaseeChapterExtractor.pattern,
"#count" : ">= 17",
"author" : ["TAKASE Masaya"],
"chapter" : int,
"chapter_minor" : r"re:^|\.5$",
"chapter_string": r"re:100\d\d\d",
"date" : datetime.datetime,
"genre" : [
"Comedy",
"Romance",
"School Life",
"Shounen",
"Slice of Life",
],
"index" : "1",
"lang" : "en",
"language" : "English",
"manga" : "Nakamura-Koedo-To-Daizu-Keisuke-Wa-Umaku-Ikanai",
"title" : "",
},
)