mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +01:00
add subcategories to extractors
This commit is contained in:
parent
81dcfbec90
commit
f7c47a6018
@ -4,7 +4,14 @@
|
|||||||
{
|
{
|
||||||
"pixiv":
|
"pixiv":
|
||||||
{
|
{
|
||||||
"directory_fmt": ["{category}", "{artist-id}"],
|
"user":
|
||||||
|
{
|
||||||
|
"directory_fmt": ["{category}", "{artist-id}"]
|
||||||
|
},
|
||||||
|
"bookmark":
|
||||||
|
{
|
||||||
|
"directory_fmt": ["{category}", "my bookmarks"]
|
||||||
|
},
|
||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
|
@ -21,12 +21,15 @@ class ThreeDeeBooruExtractor(booru.JSONBooruExtractor):
|
|||||||
|
|
||||||
class ThreeDeeBooruTagExtractor(ThreeDeeBooruExtractor, booru.BooruTagExtractor):
|
class ThreeDeeBooruTagExtractor(ThreeDeeBooruExtractor, booru.BooruTagExtractor):
|
||||||
"""Extract images from 3dbooru based on search-tags"""
|
"""Extract images from 3dbooru based on search-tags"""
|
||||||
|
subcategory = "tag"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?behoimi\.org/post(?:/(?:index)?)?\?tags=([^&]+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?behoimi\.org/post(?:/(?:index)?)?\?tags=([^&]+)"]
|
||||||
|
|
||||||
class ThreeDeeBooruPoolExtractor(ThreeDeeBooruExtractor, booru.BooruPoolExtractor):
|
class ThreeDeeBooruPoolExtractor(ThreeDeeBooruExtractor, booru.BooruPoolExtractor):
|
||||||
"""Extract image-pools from 3dbooru"""
|
"""Extract image-pools from 3dbooru"""
|
||||||
|
subcategory = "pool"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?behoimi\.org/pool/show/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?behoimi\.org/pool/show/(\d+)"]
|
||||||
|
|
||||||
class ThreeDeeBooruPostExtractor(ThreeDeeBooruExtractor, booru.BooruPostExtractor):
|
class ThreeDeeBooruPostExtractor(ThreeDeeBooruExtractor, booru.BooruPostExtractor):
|
||||||
"""Extract single images from 3dbooru"""
|
"""Extract single images from 3dbooru"""
|
||||||
|
subcategory = "post"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?behoimi\.org/post/show/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?behoimi\.org/post/show/(\d+)"]
|
||||||
|
@ -17,12 +17,15 @@ class DanbooruExtractor(booru.JSONBooruExtractor):
|
|||||||
|
|
||||||
class DanbooruTagExtractor(DanbooruExtractor, booru.BooruTagExtractor):
|
class DanbooruTagExtractor(DanbooruExtractor, booru.BooruTagExtractor):
|
||||||
"""Extract images from danbooru based on search-tags"""
|
"""Extract images from danbooru based on search-tags"""
|
||||||
|
subcategory = "tag"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?danbooru.donmai.us/posts\?(?:utf8=%E2%9C%93&)?tags=([^&]+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?danbooru.donmai.us/posts\?(?:utf8=%E2%9C%93&)?tags=([^&]+)"]
|
||||||
|
|
||||||
class DanbooruPoolExtractor(DanbooruExtractor, booru.BooruPoolExtractor):
|
class DanbooruPoolExtractor(DanbooruExtractor, booru.BooruPoolExtractor):
|
||||||
"""Extract image-pools from danbooru"""
|
"""Extract image-pools from danbooru"""
|
||||||
|
subcategory = "pool"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?danbooru.donmai.us/pools/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?danbooru.donmai.us/pools/(\d+)"]
|
||||||
|
|
||||||
class DanbooruPostExtractor(DanbooruExtractor, booru.BooruPostExtractor):
|
class DanbooruPostExtractor(DanbooruExtractor, booru.BooruPostExtractor):
|
||||||
"""Extract single images from danbooru"""
|
"""Extract single images from danbooru"""
|
||||||
|
subcategory = "post"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?danbooru.donmai.us/posts/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?danbooru.donmai.us/posts/(\d+)"]
|
||||||
|
@ -17,6 +17,7 @@ class E621Extractor(booru.JSONBooruExtractor):
|
|||||||
|
|
||||||
class E621TagExtractor(E621Extractor, booru.BooruTagExtractor):
|
class E621TagExtractor(E621Extractor, booru.BooruTagExtractor):
|
||||||
"""Extract images from e621 based on search-tags"""
|
"""Extract images from e621 based on search-tags"""
|
||||||
|
subcategory = "tag"
|
||||||
pattern = [
|
pattern = [
|
||||||
r"(?:https?://)?(?:www\.)?e621\.net/post/index/\d+/([^?]+)",
|
r"(?:https?://)?(?:www\.)?e621\.net/post/index/\d+/([^?]+)",
|
||||||
r"(?:https?://)?(?:www\.)?e621\.net/post\?tags=([^&]+)",
|
r"(?:https?://)?(?:www\.)?e621\.net/post\?tags=([^&]+)",
|
||||||
@ -24,8 +25,10 @@ class E621TagExtractor(E621Extractor, booru.BooruTagExtractor):
|
|||||||
|
|
||||||
class E621PoolExtractor(E621Extractor, booru.BooruPoolExtractor):
|
class E621PoolExtractor(E621Extractor, booru.BooruPoolExtractor):
|
||||||
"""Extract image-pools from e621"""
|
"""Extract image-pools from e621"""
|
||||||
|
subcategory = "pool"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?e621\.net/pool/show/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?e621\.net/pool/show/(\d+)"]
|
||||||
|
|
||||||
class E621PostExtractor(E621Extractor, booru.BooruPostExtractor):
|
class E621PostExtractor(E621Extractor, booru.BooruPostExtractor):
|
||||||
"""Extract single images from e621"""
|
"""Extract single images from e621"""
|
||||||
|
subcategory = "post"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?e621\.net/post/show/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?e621\.net/post/show/(\d+)"]
|
||||||
|
@ -31,13 +31,16 @@ class GelbooruExtractor(booru.XMLBooruExtractor):
|
|||||||
|
|
||||||
class GelbooruTagExtractor(GelbooruExtractor, booru.BooruTagExtractor):
|
class GelbooruTagExtractor(GelbooruExtractor, booru.BooruTagExtractor):
|
||||||
"""Extract images from gelbooru based on search-tags"""
|
"""Extract images from gelbooru based on search-tags"""
|
||||||
|
subcategory = "tag"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?gelbooru\.com/(?:index\.php)?\?page=post&s=list&tags=([^&]+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?gelbooru\.com/(?:index\.php)?\?page=post&s=list&tags=([^&]+)"]
|
||||||
|
|
||||||
# TODO: find out how to access pools via gelbooru-api
|
# TODO: find out how to access pools via gelbooru-api
|
||||||
# class GelbooruPoolExtractor(GelbooruExtractor, booru.BooruPoolExtractor):
|
# class GelbooruPoolExtractor(GelbooruExtractor, booru.BooruPoolExtractor):
|
||||||
# """Extract image-pools from gelbooru"""
|
# """Extract image-pools from gelbooru"""
|
||||||
|
# subcategory = "pool"
|
||||||
# pattern = [r"(?:https?://)?(?:www\.)?gelbooru\.com/(?:index\.php)?\?page=pool&s=show&id=(\d+)"]
|
# pattern = [r"(?:https?://)?(?:www\.)?gelbooru\.com/(?:index\.php)?\?page=pool&s=show&id=(\d+)"]
|
||||||
|
|
||||||
class GelbooruPostExtractor(GelbooruExtractor, booru.BooruPostExtractor):
|
class GelbooruPostExtractor(GelbooruExtractor, booru.BooruPostExtractor):
|
||||||
"""Extract single images from gelbooru"""
|
"""Extract single images from gelbooru"""
|
||||||
|
subcategory = "post"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?gelbooru\.com/(?:index\.php)?\?page=post&s=view&id=(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?gelbooru\.com/(?:index\.php)?\?page=post&s=view&id=(\d+)"]
|
||||||
|
@ -14,6 +14,7 @@ from .. import text
|
|||||||
class HentaiFoundryUserExtractor(Extractor):
|
class HentaiFoundryUserExtractor(Extractor):
|
||||||
"""Extract all pictures of a hentaifoundry-user"""
|
"""Extract all pictures of a hentaifoundry-user"""
|
||||||
category = "hentaifoundry"
|
category = "hentaifoundry"
|
||||||
|
subcategory = "user"
|
||||||
directory_fmt = ["{category}", "{artist}"]
|
directory_fmt = ["{category}", "{artist}"]
|
||||||
filename_fmt = "{category}_{index}_{title}.{extension}"
|
filename_fmt = "{category}_{index}_{title}.{extension}"
|
||||||
pattern = [
|
pattern = [
|
||||||
@ -103,6 +104,7 @@ class HentaiFoundryUserExtractor(Extractor):
|
|||||||
class HentaiFoundryImageExtractor(Extractor):
|
class HentaiFoundryImageExtractor(Extractor):
|
||||||
"""Extract a single hentaifoundry picture"""
|
"""Extract a single hentaifoundry picture"""
|
||||||
category = "hentaifoundry"
|
category = "hentaifoundry"
|
||||||
|
subcategory = "image"
|
||||||
directory_fmt = ["{category}", "{artist}"]
|
directory_fmt = ["{category}", "{artist}"]
|
||||||
filename_fmt = "{category}_{index}_{title}.{extension}"
|
filename_fmt = "{category}_{index}_{title}.{extension}"
|
||||||
pattern = [(r"(?:https?://)?(?:www\.)?hentai-foundry\.com/pictures/user/"
|
pattern = [(r"(?:https?://)?(?:www\.)?hentai-foundry\.com/pictures/user/"
|
||||||
|
@ -26,6 +26,7 @@ class KissmangaExtractor(Extractor):
|
|||||||
|
|
||||||
class KissmangaMangaExtractor(KissmangaExtractor):
|
class KissmangaMangaExtractor(KissmangaExtractor):
|
||||||
"""Extract all manga-chapters from kissmanga"""
|
"""Extract all manga-chapters from kissmanga"""
|
||||||
|
subcategory = "manga"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?kissmanga\.com/Manga/[^/]+/?$"]
|
pattern = [r"(?:https?://)?(?:www\.)?kissmanga\.com/Manga/[^/]+/?$"]
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
@ -44,6 +45,7 @@ class KissmangaMangaExtractor(KissmangaExtractor):
|
|||||||
|
|
||||||
class KissmangaChapterExtractor(KissmangaExtractor):
|
class KissmangaChapterExtractor(KissmangaExtractor):
|
||||||
"""Extract a single manga-chapter from kissmanga"""
|
"""Extract a single manga-chapter from kissmanga"""
|
||||||
|
subcategory = "chapter"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?kissmanga\.com/Manga/.+/.+\?id=\d+"]
|
pattern = [r"(?:https?://)?(?:www\.)?kissmanga\.com/Manga/.+/.+\?id=\d+"]
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
|
@ -17,12 +17,15 @@ class KonachanExtractor(booru.JSONBooruExtractor):
|
|||||||
|
|
||||||
class KonachanTagExtractor(KonachanExtractor, booru.BooruTagExtractor):
|
class KonachanTagExtractor(KonachanExtractor, booru.BooruTagExtractor):
|
||||||
"""Extract images from konachan based on search-tags"""
|
"""Extract images from konachan based on search-tags"""
|
||||||
|
subcategory = "tag"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?konachan\.com/post\?tags=([^&]+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?konachan\.com/post\?tags=([^&]+)"]
|
||||||
|
|
||||||
class KonachanPoolExtractor(KonachanExtractor, booru.BooruPoolExtractor):
|
class KonachanPoolExtractor(KonachanExtractor, booru.BooruPoolExtractor):
|
||||||
"""Extract image-pools from konachan"""
|
"""Extract image-pools from konachan"""
|
||||||
|
subcategory = "pool"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?konachan\.com/pool/show/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?konachan\.com/pool/show/(\d+)"]
|
||||||
|
|
||||||
class KonachanPostExtractor(KonachanExtractor, booru.BooruPostExtractor):
|
class KonachanPostExtractor(KonachanExtractor, booru.BooruPostExtractor):
|
||||||
"""Extract single images from konachan"""
|
"""Extract single images from konachan"""
|
||||||
|
subcategory = "post"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?konachan\.com/post/show/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?konachan\.com/post/show/(\d+)"]
|
||||||
|
@ -15,6 +15,7 @@ import re
|
|||||||
class MangaHereMangaExtractor(Extractor):
|
class MangaHereMangaExtractor(Extractor):
|
||||||
"""Extract all manga-chapters from mangahere"""
|
"""Extract all manga-chapters from mangahere"""
|
||||||
category = "mangahere"
|
category = "mangahere"
|
||||||
|
subcategory = "manga"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?mangahere\.co/manga/([^/]+)/?$"]
|
pattern = [r"(?:https?://)?(?:www\.)?mangahere\.co/manga/([^/]+)/?$"]
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
@ -38,6 +39,7 @@ class MangaHereMangaExtractor(Extractor):
|
|||||||
class MangaHereChapterExtractor(AsynchronousExtractor):
|
class MangaHereChapterExtractor(AsynchronousExtractor):
|
||||||
"""Extract a single manga-chapter from mangahere"""
|
"""Extract a single manga-chapter from mangahere"""
|
||||||
category = "mangahere"
|
category = "mangahere"
|
||||||
|
subcategory = "chapter"
|
||||||
directory_fmt = ["{category}", "{manga}", "c{chapter:>03}{chapter-minor}"]
|
directory_fmt = ["{category}", "{manga}", "c{chapter:>03}{chapter-minor}"]
|
||||||
filename_fmt = "{manga}_c{chapter:>03}{chapter-minor}_{page:>03}.{extension}"
|
filename_fmt = "{manga}_c{chapter:>03}{chapter-minor}_{page:>03}.{extension}"
|
||||||
pattern = [(r"(?:https?://)?(?:www\.)?mangahere\.co/manga/"
|
pattern = [(r"(?:https?://)?(?:www\.)?mangahere\.co/manga/"
|
||||||
|
@ -15,6 +15,7 @@ import re
|
|||||||
class MangaMintMangaExtractor(Extractor):
|
class MangaMintMangaExtractor(Extractor):
|
||||||
"""Extract all manga-chapters from mangamint"""
|
"""Extract all manga-chapters from mangamint"""
|
||||||
category = "mangamint"
|
category = "mangamint"
|
||||||
|
subcategory = "manga"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?mangamint\.com(/manga/[^\?]+-manga)"]
|
pattern = [r"(?:https?://)?(?:www\.)?mangamint\.com(/manga/[^\?]+-manga)"]
|
||||||
url_base = "https://www.mangamint.com"
|
url_base = "https://www.mangamint.com"
|
||||||
|
|
||||||
@ -45,6 +46,7 @@ class MangaMintMangaExtractor(Extractor):
|
|||||||
class MangaMintChapterExtractor(Extractor):
|
class MangaMintChapterExtractor(Extractor):
|
||||||
"""Extract a single manga-chapter from mangamint"""
|
"""Extract a single manga-chapter from mangamint"""
|
||||||
category = "mangamint"
|
category = "mangamint"
|
||||||
|
subcategory = "chapter"
|
||||||
directory_fmt = ["{category}", "{manga}", "c{chapter:>03}{chapter-minor}"]
|
directory_fmt = ["{category}", "{manga}", "c{chapter:>03}{chapter-minor}"]
|
||||||
filename_fmt = "{manga}_c{chapter:>03}{chapter-minor}_{page:>03}.{extension}"
|
filename_fmt = "{manga}_c{chapter:>03}{chapter-minor}_{page:>03}.{extension}"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?mangamint\.com/([^\?]+-(\d+))"]
|
pattern = [r"(?:https?://)?(?:www\.)?mangamint\.com/([^\?]+-(\d+))"]
|
||||||
|
@ -18,11 +18,13 @@ class MangaPandaBase():
|
|||||||
|
|
||||||
class MangaPandaMangaExtractor(MangaPandaBase, MangaReaderMangaExtractor):
|
class MangaPandaMangaExtractor(MangaPandaBase, MangaReaderMangaExtractor):
|
||||||
"""Extract all manga-chapters from mangapanda"""
|
"""Extract all manga-chapters from mangapanda"""
|
||||||
|
subcategory = "manga"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?mangapanda\.com(/[^/]+)$"]
|
pattern = [r"(?:https?://)?(?:www\.)?mangapanda\.com(/[^/]+)$"]
|
||||||
|
|
||||||
|
|
||||||
class MangaPandaChapterExtractor(MangaPandaBase, MangaReaderChapterExtractor):
|
class MangaPandaChapterExtractor(MangaPandaBase, MangaReaderChapterExtractor):
|
||||||
"""Extract a single manga-chapter from mangapanda"""
|
"""Extract a single manga-chapter from mangapanda"""
|
||||||
|
subcategory = "chapter"
|
||||||
pattern = [
|
pattern = [
|
||||||
r"(?:https?://)?(?:www\.)?mangapanda\.com((/[^/]+)/(\d+))",
|
r"(?:https?://)?(?:www\.)?mangapanda\.com((/[^/]+)/(\d+))",
|
||||||
r"(?:https?://)?(?:www\.)?mangapanda\.com(/\d+-\d+-\d+(/[^/]+)/chapter-(\d+).html)",
|
r"(?:https?://)?(?:www\.)?mangapanda\.com(/\d+-\d+-\d+(/[^/]+)/chapter-(\d+).html)",
|
||||||
|
@ -21,6 +21,7 @@ class MangaReaderBase():
|
|||||||
|
|
||||||
class MangaReaderMangaExtractor(MangaReaderBase, Extractor):
|
class MangaReaderMangaExtractor(MangaReaderBase, Extractor):
|
||||||
"""Extract all manga-chapters from mangareader"""
|
"""Extract all manga-chapters from mangareader"""
|
||||||
|
subcategory = "manga"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?mangareader\.net(/[^/]+)$"]
|
pattern = [r"(?:https?://)?(?:www\.)?mangareader\.net(/[^/]+)$"]
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
@ -39,6 +40,7 @@ class MangaReaderMangaExtractor(MangaReaderBase, Extractor):
|
|||||||
|
|
||||||
class MangaReaderChapterExtractor(MangaReaderBase, AsynchronousExtractor):
|
class MangaReaderChapterExtractor(MangaReaderBase, AsynchronousExtractor):
|
||||||
"""Extract a single manga-chapter from mangareader"""
|
"""Extract a single manga-chapter from mangareader"""
|
||||||
|
subcategory = "chapter"
|
||||||
pattern = [
|
pattern = [
|
||||||
r"(?:https?://)?(?:www\.)?mangareader\.net((/[^/]+)/(\d+))",
|
r"(?:https?://)?(?:www\.)?mangareader\.net((/[^/]+)/(\d+))",
|
||||||
r"(?:https?://)?(?:www\.)?mangareader\.net(/\d+-\d+-\d+(/[^/]+)/chapter-(\d+).html)",
|
r"(?:https?://)?(?:www\.)?mangareader\.net(/\d+-\d+-\d+(/[^/]+)/chapter-(\d+).html)",
|
||||||
|
@ -14,6 +14,7 @@ from .. import text
|
|||||||
class MangaShareMangaExtractor(Extractor):
|
class MangaShareMangaExtractor(Extractor):
|
||||||
"""Extract all manga-chapters from mangashare"""
|
"""Extract all manga-chapters from mangashare"""
|
||||||
category = "mangashare"
|
category = "mangashare"
|
||||||
|
subcategory = "manga"
|
||||||
pattern = [r"(?:https?://)?read\.mangashare\.com/[^/]+$"]
|
pattern = [r"(?:https?://)?read\.mangashare\.com/[^/]+$"]
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
@ -36,6 +37,7 @@ class MangaShareMangaExtractor(Extractor):
|
|||||||
class MangaShareChapterExtractor(AsynchronousExtractor):
|
class MangaShareChapterExtractor(AsynchronousExtractor):
|
||||||
"""Extract a single manga-chapter from mangashare"""
|
"""Extract a single manga-chapter from mangashare"""
|
||||||
category = "mangashare"
|
category = "mangashare"
|
||||||
|
subcategory = "chapter"
|
||||||
directory_fmt = ["{category}", "{manga}", "c{chapter:>03} - {title}"]
|
directory_fmt = ["{category}", "{manga}", "c{chapter:>03} - {title}"]
|
||||||
filename_fmt = "{manga}_c{chapter:>03}_{page:>03}.{extension}"
|
filename_fmt = "{manga}_c{chapter:>03}_{page:>03}.{extension}"
|
||||||
pattern = [r"(?:https?://)?read\.mangashare\.com/([^/]+/chapter-\d+)"]
|
pattern = [r"(?:https?://)?read\.mangashare\.com/([^/]+/chapter-\d+)"]
|
||||||
|
@ -17,6 +17,7 @@ import time
|
|||||||
class PixivUserExtractor(Extractor):
|
class PixivUserExtractor(Extractor):
|
||||||
"""Extract all works of a single pixiv-user"""
|
"""Extract all works of a single pixiv-user"""
|
||||||
category = "pixiv"
|
category = "pixiv"
|
||||||
|
subcategory = "user"
|
||||||
directory_fmt = ["{category}", "{artist-id}-{artist-nick}"]
|
directory_fmt = ["{category}", "{artist-id}-{artist-nick}"]
|
||||||
filename_fmt = "{category}_{artist-id}_{id}{num}.{extension}"
|
filename_fmt = "{category}_{artist-id}_{id}{num}.{extension}"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/member(?:_illust)?\.php\?id=(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/member(?:_illust)?\.php\?id=(\d+)"]
|
||||||
@ -132,6 +133,7 @@ class PixivUserExtractor(Extractor):
|
|||||||
|
|
||||||
class PixivWorkExtractor(PixivUserExtractor):
|
class PixivWorkExtractor(PixivUserExtractor):
|
||||||
"""Extract a single pixiv work/illustration"""
|
"""Extract a single pixiv work/illustration"""
|
||||||
|
subcategory = "work"
|
||||||
pattern = [(r"(?:https?://)?(?:www\.)?pixiv\.net/member(?:_illust)?\.php"
|
pattern = [(r"(?:https?://)?(?:www\.)?pixiv\.net/member(?:_illust)?\.php"
|
||||||
r"\?(?:[^&]+&)*illust_id=(\d+)")]
|
r"\?(?:[^&]+&)*illust_id=(\d+)")]
|
||||||
|
|
||||||
@ -151,6 +153,7 @@ class PixivWorkExtractor(PixivUserExtractor):
|
|||||||
|
|
||||||
class PixivFavoriteExtractor(PixivUserExtractor):
|
class PixivFavoriteExtractor(PixivUserExtractor):
|
||||||
"""Extract all favorites/bookmarks of a single pixiv-user"""
|
"""Extract all favorites/bookmarks of a single pixiv-user"""
|
||||||
|
subcategory = "favorite"
|
||||||
directory_fmt = ["{category}", "bookmarks", "{artist-id}-{artist-nick}"]
|
directory_fmt = ["{category}", "bookmarks", "{artist-id}-{artist-nick}"]
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/bookmark\.php\?id=(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/bookmark\.php\?id=(\d+)"]
|
||||||
|
|
||||||
@ -164,6 +167,7 @@ class PixivFavoriteExtractor(PixivUserExtractor):
|
|||||||
|
|
||||||
class PixivBookmarkExtractor(PixivFavoriteExtractor):
|
class PixivBookmarkExtractor(PixivFavoriteExtractor):
|
||||||
"""Extract all favorites/bookmarks of your own account"""
|
"""Extract all favorites/bookmarks of your own account"""
|
||||||
|
subcategory = "bookmark"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/bookmark\.php()$"]
|
pattern = [r"(?:https?://)?(?:www\.)?pixiv\.net/bookmark\.php()$"]
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
|
@ -27,8 +27,10 @@ class SafebooruExtractor(booru.XMLBooruExtractor):
|
|||||||
|
|
||||||
class SafebooruTagExtractor(SafebooruExtractor, booru.BooruTagExtractor):
|
class SafebooruTagExtractor(SafebooruExtractor, booru.BooruTagExtractor):
|
||||||
"""Extract images from safebooru based on search-tags"""
|
"""Extract images from safebooru based on search-tags"""
|
||||||
|
subcategory = "tag"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?\?page=post&s=list&tags=([^&]+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?\?page=post&s=list&tags=([^&]+)"]
|
||||||
|
|
||||||
class SafebooruPostExtractor(SafebooruExtractor, booru.BooruPostExtractor):
|
class SafebooruPostExtractor(SafebooruExtractor, booru.BooruPostExtractor):
|
||||||
"""Extract single images from safebooru"""
|
"""Extract single images from safebooru"""
|
||||||
|
subcategory = "post"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?\?page=post&s=view&id=(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?\?page=post&s=view&id=(\d+)"]
|
||||||
|
@ -17,12 +17,15 @@ class YandereExtractor(booru.JSONBooruExtractor):
|
|||||||
|
|
||||||
class YandereTagExtractor(YandereExtractor, booru.BooruTagExtractor):
|
class YandereTagExtractor(YandereExtractor, booru.BooruTagExtractor):
|
||||||
"""Extract images from yandere based on search-tags"""
|
"""Extract images from yandere based on search-tags"""
|
||||||
|
subcategory = "tag"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?yande\.re/post\?tags=([^&]+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?yande\.re/post\?tags=([^&]+)"]
|
||||||
|
|
||||||
class YanderePoolExtractor(YandereExtractor, booru.BooruPoolExtractor):
|
class YanderePoolExtractor(YandereExtractor, booru.BooruPoolExtractor):
|
||||||
"""Extract image-pools from yandere"""
|
"""Extract image-pools from yandere"""
|
||||||
|
subcategory = "pool"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?yande.re/pool/show/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?yande.re/pool/show/(\d+)"]
|
||||||
|
|
||||||
class YanderePostExtractor(YandereExtractor, booru.BooruPostExtractor):
|
class YanderePostExtractor(YandereExtractor, booru.BooruPostExtractor):
|
||||||
"""Extract single images from yandere"""
|
"""Extract single images from yandere"""
|
||||||
|
subcategory = "post"
|
||||||
pattern = [r"(?:https?://)?(?:www\.)?yande.re/post/show/(\d+)"]
|
pattern = [r"(?:https?://)?(?:www\.)?yande.re/post/show/(\d+)"]
|
||||||
|
Loading…
Reference in New Issue
Block a user