[bato] rename to 'batoto'

to use the same category name as the previous bato.to site
pull/5029/head
Mike Fährmann 9 months ago
parent 3aa24c3744
commit b11c352d66
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -98,7 +98,7 @@ Consider all listed sites to potentially be NSFW.
<td></td>
</tr>
<tr>
<td>Bato</td>
<td>BATO.TO</td>
<td>https://bato.to/</td>
<td>Chapters, Manga</td>
<td></td>

@ -24,7 +24,7 @@ modules = [
"architizer",
"artstation",
"aryion",
"bato",
"batoto",
"bbc",
"behance",
"blogger",

@ -14,9 +14,9 @@ BASE_PATTERN = (r"(?:https?://)?"
r"(?:(?:ba|d|w)to\.to|\.to|(?:batotoo|mangatoto)\.com)")
class BatoBase():
"""Base class for bato extractors"""
category = "bato"
class BatotoBase():
"""Base class for batoto extractors"""
category = "batoto"
root = "https://bato.to"
def request(self, url, **kwargs):
@ -24,7 +24,7 @@ class BatoBase():
return Extractor.request(self, url, **kwargs)
class BatoChapterExtractor(BatoBase, ChapterExtractor):
class BatotoChapterExtractor(BatotoBase, ChapterExtractor):
"""Extractor for bato.to manga chapters"""
pattern = BASE_PATTERN + r"/(?:title/[^/?#]+|chapter)/(\d+)"
example = "https://bato.to/title/12345-MANGA/54321"
@ -72,10 +72,10 @@ class BatoChapterExtractor(BatoBase, ChapterExtractor):
]
class BatoMangaExtractor(BatoBase, MangaExtractor):
class BatotoMangaExtractor(BatotoBase, MangaExtractor):
"""Extractor for bato.to manga"""
reverse = False
chapterclass = BatoChapterExtractor
chapterclass = BatotoChapterExtractor
pattern = BASE_PATTERN + r"/(?:title|series)/(\d+)[^/?#]*/?$"
example = "https://bato.to/title/12345-MANGA/"

@ -32,7 +32,7 @@ CATEGORY_MAP = {
"atfbooru" : "ATFBooru",
"b4k" : "arch.b4k.co",
"baraag" : "baraag",
"bato" : "Bato",
"batoto" : "BATO.TO",
"bbc" : "BBC",
"comicvine" : "Comic Vine",
"coomerparty" : "Coomer",

@ -4,14 +4,14 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
from gallery_dl.extractor import bato
from gallery_dl.extractor import batoto
from gallery_dl import exception
__tests__ = (
{
"#url" : "https://bato.to/title/86408-i-shall-master-this-family-official/1681030-ch_8",
"#category": ("", "bato", "chapter"),
"#class" : bato.BatoChapterExtractor,
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
"#count" : 66,
"manga" : "I Shall Master this Family! [Official]",
@ -21,8 +21,8 @@ __tests__ = (
{
"#url" : "https://bato.to/title/104929-86-eighty-six-official/1943513-vol_1-ch_5",
"#comment" : "volume (vol) in url",
"#category": ("", "bato", "chapter"),
"#class" : bato.BatoChapterExtractor,
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
"#count" : 7,
"manga" : "86--EIGHTY-SIX (Official)",
@ -32,8 +32,8 @@ __tests__ = (
},
{
"#url" : "https://bato.to/title/113742-futsutsuka-na-akujo-de-wa-gozaimasu-ga-suuguu-chouso-torikae-den-official",
"#category": ("", "bato", "manga"),
"#class" : bato.BatoMangaExtractor,
"#category": ("", "batoto", "manga"),
"#class" : batoto.BatotoMangaExtractor,
"#count" : ">= 21",
"manga" : "Futsutsuka na Akujo de wa Gozaimasu ga - Suuguu Chouso Torikae Den (Official)",
@ -41,8 +41,8 @@ __tests__ = (
{
"#url" : "https://bato.to/title/104929-86-eighty-six-official",
"#comment" : "Manga with number in name",
"#category": ("", "bato", "manga"),
"#class" : bato.BatoMangaExtractor,
"#category": ("", "batoto", "manga"),
"#class" : batoto.BatotoMangaExtractor,
"#count" : ">= 18",
"manga" : "86--EIGHTY-SIX (Official)",
@ -50,16 +50,16 @@ __tests__ = (
{
"#url" : "https://bato.to/title/140046-the-grand-duke-s-fox-princess-mgchan",
"#comment" : "Non-English translation (Indonesian)",
"#category": ("", "bato", "manga"),
"#class" : bato.BatoMangaExtractor,
"#category": ("", "batoto", "manga"),
"#class" : batoto.BatotoMangaExtractor,
"#count" : ">= 29",
"manga" : "The Grand Dukes Fox Princess ⎝⎝MGCHAN⎠⎠",
},
{
"#url" : "https://bato.to/title/134270-removed",
"#category": ("", "bato", "manga"),
"#class" : bato.BatoMangaExtractor,
"#category": ("", "batoto", "manga"),
"#class" : batoto.BatotoMangaExtractor,
"#exception": exception.StopExtraction,
}
)
Loading…
Cancel
Save