Skip to content

Commit

Permalink
[batoto] support more mirror domains (#5042)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jan 9, 2024
1 parent 0a382a5 commit 887ade3
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 14 deletions.
7 changes: 5 additions & 2 deletions gallery_dl/extractor/batoto.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
from .. import text, exception
import re

BASE_PATTERN = (r"(?:https?://)?"
r"(?:(?:ba|d|w)to\.to|(?:batotoo|mangatoto)\.com)")
BASE_PATTERN = (r"(?:https?://)?(?:"
r"(?:ba|d|h|m|w)to\.to|"
r"(?:(?:manga|read)toto|batocomic|[xz]bato)\.(?:com|net|org)|"
r"comiko\.(?:net|org)|"
r"bat(?:otoo|o?two)\.com)")


class BatotoBase():
Expand Down
130 changes: 118 additions & 12 deletions test/results/batoto.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@
"chapter": 5,
},

{
"#url" : "https://bato.to/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://bato.to/chapter/1681030",
"#comment" : "v2 URL",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://bato.to/title/113742-futsutsuka-na-akujo-de-wa-gozaimasu-ga-suuguu-chouso-torikae-den-official",
"#category": ("", "batoto", "manga"),
Expand Down Expand Up @@ -84,51 +97,144 @@
},

{
"#url" : "https://bato.to/title/86408/1681030",
"#url" : "https://bato.to/title/86408-i-shall-master-this-family-official",
"#category": ("", "batoto", "manga"),
"#class" : batoto.BatotoMangaExtractor,
},

{
"#url" : "https://bato.to/series/86408/i-shall-master-this-family-official",
"#comment" : "v2 URL",
"#category": ("", "batoto", "manga"),
"#class" : batoto.BatotoMangaExtractor,
},

{
"#url" : "https://dto.to/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://hto.to/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://mto.to/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://wto.to/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://bato.to/chapter/1681030",
"#url" : "https://mangatoto.com/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://mangatoto.net/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://mangatoto.org/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://dto.to/title/86408/1681030",
"#url" : "https://batocomic.com/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://batocomic.net/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://batocomic.org/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://wto.to/title/86408/1681030",
"#url" : "https://readtoto.com/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://readtoto.net/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://readtoto.org/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://batotoo.com/title/86408/1681030",
"#url" : "https://xbato.com/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://xbato.net/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://xbato.org/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://mangatoto.com/title/86408/1681030",
"#url" : "https://zbato.com/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://zbato.net/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://zbato.org/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://bato.to/title/86408-i-shall-master-this-family-official",
"#category": ("", "batoto", "manga"),
"#class" : batoto.BatotoMangaExtractor,
"#url" : "https://comiko.net/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://comiko.org/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

{
"#url" : "https://bato.to/series/86408/i-shall-master-this-family-official",
"#category": ("", "batoto", "manga"),
"#class" : batoto.BatotoMangaExtractor,
"#url" : "https://batotoo.com/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://batotwo.com/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},
{
"#url" : "https://battwo.com/title/86408/1681030",
"#category": ("", "batoto", "chapter"),
"#class" : batoto.BatotoChapterExtractor,
},

)

0 comments on commit 887ade3

Please sign in to comment.