Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6403,6 +6403,21 @@ Note
It is possible to use ``"all"`` instead of listing all values separately.


extractor.toonily.family-mode
------------------------------
Type
``bool``
Default
``false``
Description
Controls whether adult content is accessible.

``true``
Enable family mode — adult content is hidden (``toonily-mature`` cookie is not set)
``false``
Disable family mode — set ``toonily-mature=1`` to allow adult content


extractor.tumblr.avatar
-----------------------
Type
Expand Down Expand Up @@ -7367,6 +7382,21 @@ Description
Useful for creating CBZ archives with actual source thumbnails.


extractor.webtoonxyz.family-mode
---------------------------------
Type
``bool``
Default
``false``
Description
Controls whether adult content is accessible.

``true``
Enable family mode — adult content is hidden (``wpmanga-adault`` cookie is not set)
``false``
Disable family mode — set ``wpmanga-adault=1`` to allow adult content


extractor.weebdex.data-saver
----------------------------
Type
Expand Down
12 changes: 12 additions & 0 deletions docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,12 @@ Consider all listed sites to potentially be NSFW.
<td>Galleries</td>
<td></td>
</tr>
<tr id="toonily" title="toonily">
<td>Toonily</td>
<td>https://toonily.com/</td>
<td>Chapters, Genres, Home Feed, Manga, Tag Searches</td>
<td><a href="https://github.com/mikf/gallery-dl#cookies">Cookies</a></td>
</tr>
<tr id="toyhouse" title="toyhouse">
<td>Toyhouse</td>
<td>https://toyhou.se/</td>
Expand Down Expand Up @@ -1273,6 +1279,12 @@ Consider all listed sites to potentially be NSFW.
<td>Artists, Comics, Episodes</td>
<td></td>
</tr>
<tr id="webtoonxyz" title="webtoonxyz">
<td>Webtoonxyz</td>
<td>https://www.webtoon.xyz/</td>
<td>Chapters, Home Feed, Manga</td>
<td><a href="https://github.com/mikf/gallery-dl#cookies">Cookies</a></td>
</tr>
<tr id="weebcentral" title="weebcentral">
<td>Weeb Central</td>
<td>https://weebcentral.com/</td>
Expand Down
3 changes: 3 additions & 0 deletions gallery_dl/extractor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"thehentaiworld",
"tiktok",
"tmohentai",
"toonily",
"toyhouse",
"tumblr",
"tumblrgallery",
Expand All @@ -240,13 +241,15 @@
"weasyl",
"webmshare",
"webtoons",
"webtoonxyz",
"weebcentral",
"weebdex",
"weibo",
"whyp",
"wikiart",
"wikifeet",
"wikimedia",
"wpmadara",
"xasiat",
"xenforo",
"xfolio",
Expand Down
104 changes: 104 additions & 0 deletions gallery_dl/extractor/toonily.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# -*- 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.

"""Extractors for https://toonily.com/"""

from .. import text
from .wpmadara import (
WPMadaraChapterExtractor,
WPMadaraHomeExtractor,
WPMadaraMangaExtractor,
)


class ToonilyChapterExtractor(WPMadaraChapterExtractor):
"""Extractor for manga chapters from toonily.com"""
category = "toonily"
root = "https://toonily.com"
cookies_domain = ".toonily.com"
pattern = r"(?:https?://)?(?:www\.)?toonily\.com(/serie/[^/?#]+/[^/?#]+)"
example = "https://toonily.com/serie/MANGA/chapter-1/"

def initialize(self):
WPMadaraChapterExtractor.initialize(self)
if not self.config("family-mode", False):
self.cookies.update({"toonily-mature": "1"})

def images(self, page):
return [
(url, data)
for url, data in WPMadaraChapterExtractor.images(self, page)
if "wp-content/assets" not in url
]


class ToonilyMangaExtractor(WPMadaraMangaExtractor):
"""Extractor for manga from toonily.com"""
category = "toonily"
chapterclass = ToonilyChapterExtractor
root = "https://toonily.com"
cookies_domain = ".toonily.com"
pattern = r"(?:https?://)?(?:www\.)?toonily\.com(/serie/[^/?#]+)/?$"
example = "https://toonily.com/serie/MANGA/"

def initialize(self):
WPMadaraMangaExtractor.initialize(self)
if not self.config("family-mode", False):
self.cookies.update({"toonily-mature": "1"})


class ToonilyListExtractor(WPMadaraHomeExtractor):
"""Base class for manga listings from toonily.com"""
category = "toonily"
root = "https://toonily.com"
cookies_domain = ".toonily.com"
mangaextractor = ToonilyMangaExtractor

def initialize(self):
WPMadaraHomeExtractor.initialize(self)
if not self.config("family-mode", False):
self.cookies.update({"toonily-mature": "1"})


class ToonilyHomeExtractor(ToonilyListExtractor):
"""Extractor for manga listings from toonily.com"""
pattern = r"(?:https?://)?(?:www\.)?toonily\.com(?:/page/(\d+))?/?$"
example = "https://toonily.com/"


class ToonilyTaxonomyExtractor(ToonilyListExtractor):
"""Base class for taxonomy listings from toonily.com"""
taxonomy = ""

def __init__(self, match):
ToonilyListExtractor.__init__(self, match)
self.term = match[1]
self.page = text.parse_int(match[2], 1)

def page_url(self, page_num):
url = "{}/{}/{}/".format(
self.root.rstrip("/"), self.taxonomy, self.term)
if page_num == 1:
return url
return "{}page/{}/".format(url, page_num)


class ToonilyTagExtractor(ToonilyTaxonomyExtractor):
"""Extractor for tag listings from toonily.com"""
subcategory = "tag"
taxonomy = "tag"
pattern = (r"(?:https?://)?(?:www\.)?toonily\.com/tag/"
r"([^/?#]+)(?:/page/(\d+))?/?$")
example = "https://toonily.com/tag/TAG/"


class ToonilyGenreExtractor(ToonilyTaxonomyExtractor):
"""Extractor for genre listings from toonily.com"""
subcategory = "genre"
taxonomy = "genre"
pattern = (r"(?:https?://)?(?:www\.)?toonily\.com/genre/"
r"([^/?#]+)(?:/page/(\d+))?/?$")
example = "https://toonily.com/genre/GENRE/"
49 changes: 49 additions & 0 deletions gallery_dl/extractor/webtoonxyz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- 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.

"""Extractors for https://www.webtoon.xyz/"""

from .wpmadara import (
WPMadaraChapterExtractor,
WPMadaraHomeExtractor,
WPMadaraMangaExtractor,
)


class WebtoonxyzBase():
"""Base class for webtoon.xyz extractors"""
category = "webtoonxyz"
root = "https://www.webtoon.xyz"
cookies_domain = ".webtoon.xyz"
browser = "firefox"

def initialize(self):
super().initialize()
if not self.config("family-mode", False):
self.cookies.update({"wpmanga-adault": "1"})


class WebtoonxyzChapterExtractor(WebtoonxyzBase, WPMadaraChapterExtractor):
"""Extractor for webtoon.xyz chapter pages"""
pattern = (
r"(?:https?://)?(?:www\.)?webtoon\.xyz"
r"(/read/[^/?#]+/[^/?#]+)"
)
example = "https://www.webtoon.xyz/read/MANGA/chapter-1/"


class WebtoonxyzMangaExtractor(WebtoonxyzBase, WPMadaraMangaExtractor):
"""Extractor for webtoon.xyz manga pages"""
chapterclass = WebtoonxyzChapterExtractor
pattern = r"(?:https?://)?(?:www\.)?webtoon\.xyz(/read/[^/?#]+)/?$"
example = "https://www.webtoon.xyz/read/MANGA/"


class WebtoonxyzHomeExtractor(WebtoonxyzBase, WPMadaraHomeExtractor):
"""Extractor for the webtoon.xyz home feed"""
mangaextractor = WebtoonxyzMangaExtractor
pattern = r"(?:https?://)?(?:www\.)?webtoon\.xyz(?:/page/(\d+))?/?$"
example = "https://www.webtoon.xyz/"
Loading