[safebooru] add pool extractor
This commit is contained in:
@@ -61,8 +61,8 @@ Read Comic Online http://readcomiconline.to/ Comic-Issues, Comics
|
|||||||
RebeccaBlackTech https://rbt.asia/ Threads
|
RebeccaBlackTech https://rbt.asia/ Threads
|
||||||
Reddit https://reddit.com/ individual Images, Submissions, Subreddits Optional (OAuth)
|
Reddit https://reddit.com/ individual Images, Submissions, Subreddits Optional (OAuth)
|
||||||
rule #34 http://rule34.paheal.net/ Posts, Tag-Searches
|
rule #34 http://rule34.paheal.net/ Posts, Tag-Searches
|
||||||
Rule 34 https://rule34.xxx/ Posts, Tag-Searches
|
Rule 34 https://rule34.xxx/ Pools, Posts, Tag-Searches
|
||||||
Safebooru https://safebooru.org/ Posts, Tag-Searches
|
Safebooru https://safebooru.org/ Pools, Posts, Tag-Searches
|
||||||
Sankaku Channel https://chan.sankakucomplex.com/ Pools, Posts, Tag-Searches Optional
|
Sankaku Channel https://chan.sankakucomplex.com/ Pools, Posts, Tag-Searches Optional
|
||||||
Sea Otter Scans https://reader.seaotterscans.com/ Chapters, Manga
|
Sea Otter Scans https://reader.seaotterscans.com/ Chapters, Manga
|
||||||
Sen Manga http://raw.senmanga.com/ Chapters
|
Sen Manga http://raw.senmanga.com/ Chapters
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class SafebooruExtractor(booru.XmlParserMixin,
|
|||||||
category = "safebooru"
|
category = "safebooru"
|
||||||
api_url = "https://safebooru.org/index.php"
|
api_url = "https://safebooru.org/index.php"
|
||||||
post_url = "https://safebooru.org/index.php?page=post&s=view&id={}"
|
post_url = "https://safebooru.org/index.php?page=post&s=view&id={}"
|
||||||
|
pool_url = "https://safebooru.org/index.php?page=pool&s=show&id={}"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
super().__init__(match)
|
super().__init__(match)
|
||||||
@@ -26,18 +27,27 @@ class SafebooruExtractor(booru.XmlParserMixin,
|
|||||||
|
|
||||||
class SafebooruTagExtractor(booru.TagMixin, SafebooruExtractor):
|
class SafebooruTagExtractor(booru.TagMixin, SafebooruExtractor):
|
||||||
"""Extractor for images from safebooru.org based on search-tags"""
|
"""Extractor for images from safebooru.org based on search-tags"""
|
||||||
pattern = [(r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?"
|
pattern = [r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?"
|
||||||
r"\?page=post&s=list&tags=(?P<tags>[^&#]+)")]
|
r"\?page=post&s=list&tags=(?P<tags>[^&#]+)"]
|
||||||
test = [("https://safebooru.org/index.php?page=post&s=list&tags=bonocho", {
|
test = [("https://safebooru.org/index.php?page=post&s=list&tags=bonocho", {
|
||||||
"url": "17c61b386530cf4c30842c9f580d15ef1cd09586",
|
"url": "17c61b386530cf4c30842c9f580d15ef1cd09586",
|
||||||
"content": "e5ad4c5bf241b1def154958535bef6c2f6b733eb",
|
"content": "e5ad4c5bf241b1def154958535bef6c2f6b733eb",
|
||||||
})]
|
})]
|
||||||
|
|
||||||
|
|
||||||
|
class SafebooruPoolExtractor(booru.GelbooruPoolMixin, SafebooruExtractor):
|
||||||
|
"""Extractor for image-pools from safebooru.org"""
|
||||||
|
pattern = [r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?"
|
||||||
|
r"\?page=pool&s=show&id=(?P<pool>\d+)"]
|
||||||
|
test = [("https://safebooru.org/index.php?page=pool&s=show&id=11", {
|
||||||
|
"count": 5,
|
||||||
|
})]
|
||||||
|
|
||||||
|
|
||||||
class SafebooruPostExtractor(booru.PostMixin, SafebooruExtractor):
|
class SafebooruPostExtractor(booru.PostMixin, SafebooruExtractor):
|
||||||
"""Extractor for single images from safebooru.org"""
|
"""Extractor for single images from safebooru.org"""
|
||||||
pattern = [(r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?"
|
pattern = [r"(?:https?://)?(?:www\.)?safebooru\.org/(?:index\.php)?"
|
||||||
r"\?page=post&s=view&id=(?P<post>\d+)")]
|
r"\?page=post&s=view&id=(?P<post>\d+)"]
|
||||||
test = [("https://safebooru.org/index.php?page=post&s=view&id=1169132", {
|
test = [("https://safebooru.org/index.php?page=post&s=view&id=1169132", {
|
||||||
"url": "cf05e37a3c62b2d55788e2080b8eabedb00f999b",
|
"url": "cf05e37a3c62b2d55788e2080b8eabedb00f999b",
|
||||||
"content": "93b293b27dabd198afafabbaf87c49863ac82f27",
|
"content": "93b293b27dabd198afafabbaf87c49863ac82f27",
|
||||||
|
|||||||
Reference in New Issue
Block a user