1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00
gallery-dl/test/results/sankaku.py

266 lines
7.5 KiB
Python
Raw Normal View History

2023-09-10 14:45:01 +02:00
# -*- 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.
from gallery_dl.extractor import sankaku
from gallery_dl import exception
__tests__ = (
{
"#url" : "https://sankaku.app/?tags=bonocho",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
"#pattern" : r"https://s\.sankakucomplex\.com/data/[^/]{2}/[^/]{2}/[0-9a-f]{32}\.\w+\?e=\d+&(expires=\d+&)?m=[^&#]+",
"#count" : 5,
},
{
"#url" : "https://beta.sankakucomplex.com/?tags=bonocho",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
{
"#url" : "https://chan.sankakucomplex.com/?tags=bonocho",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
{
"#url" : "https://black.sankakucomplex.com/?tags=bonocho",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
{
"#url" : "https://white.sankakucomplex.com/?tags=bonocho",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
{
"#url" : "https://sankaku.app/ja?tags=order%3Apopularity",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
{
"#url" : "https://sankaku.app/no/?tags=order%3Apopularity",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
{
"#url" : "https://chan.sankakucomplex.com/posts?tags=TAG",
"#comment" : "'/posts' in tag search URL (#4740)",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
{
"#url" : "https://chan.sankakucomplex.com/ja/posts/?tags=あえいおう",
"#comment" : "'/posts' in tag search URL (#4740)",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
2023-09-10 14:45:01 +02:00
{
"#url" : "https://chan.sankakucomplex.com/?tags=bonocho+a+b+c+d",
"#comment" : "error on five or more tags",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
"#options" : {"username": None},
"#exception": exception.StopExtraction,
},
{
"#url" : "https://chan.sankakucomplex.com/?tags=marie_rose&page=98&next=3874906&commit=Search",
"#comment" : "match arbitrary query parameters",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
},
{
"#url" : "https://chan.sankakucomplex.com/?tags=date:2023-03-20",
"#comment" : "'date:' tags (#1790)",
"#category": ("booru", "sankaku", "tag"),
"#class" : sankaku.SankakuTagExtractor,
"#range" : "1",
"#count" : 1,
},
{
"#url" : "https://sankaku.app/books/90",
"#category": ("booru", "sankaku", "pool"),
"#class" : sankaku.SankakuPoolExtractor,
"#count" : 5,
},
{
"#url" : "https://beta.sankakucomplex.com/books/90",
"#category": ("booru", "sankaku", "pool"),
"#class" : sankaku.SankakuPoolExtractor,
},
{
"#url" : "https://chan.sankakucomplex.com/pool/show/90",
"#category": ("booru", "sankaku", "pool"),
"#class" : sankaku.SankakuPoolExtractor,
},
2023-11-24 02:41:52 +01:00
{
"#url" : "https://chan.sankakucomplex.com/pools/show/90",
"#category": ("booru", "sankaku", "pool"),
"#class" : sankaku.SankakuPoolExtractor,
},
2023-09-10 14:45:01 +02:00
{
"#url" : "https://sankaku.app/posts/y0abGlDOr2o",
"#comment" : "extended tag categories; alphanumeric ID (#5073)",
2023-09-10 14:45:01 +02:00
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
"#options" : {
"tags" : True,
"id-format": "alphanumeric",
},
2023-09-10 14:45:01 +02:00
"#sha1_content": "5e255713cbf0a8e0801dc423563c34d896bb9229",
"id": "y0abGlDOr2o",
"tags_artist": [
"bonocho",
],
"tags_character": [
"batman",
"letty_whiterock",
"bruce_wayne",
"the_joker",
"heath_ledger",
],
"tags_copyright": [
"batman_(series)",
"the_dark_knight",
],
"tags_studio": [
"dc_comics",
],
"tags_general": list,
},
{
"#url" : "https://sankaku.app/post/show/360451",
"#comment" : "legacy post URL",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
"#pattern" : r"https://s\.sankakucomplex\.com/data/ac/8e/ac8e3b92ea328ce9cf7211e69c905bf9\.jpg\?e=.+",
"id": 360451,
2023-09-10 14:45:01 +02:00
},
{
"#url" : "https://sankaku.app/post/show/21418978",
"#comment" : "'contentious_content'",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
"#auth" : True,
2023-09-10 14:45:01 +02:00
"#pattern" : r"https://s\.sankakucomplex\.com/data/13/3c/133cda3bfde249c504284493903fb985\.jpg",
},
{
"#url" : "https://sankaku.app/post/show/20758561",
"#comment" : "empty tags (#1617)",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
"#options" : {"tags": True},
"#count" : 1,
"id" : 20758561,
2023-09-10 14:45:01 +02:00
"tags" : list,
"tags_general": [
"key(mangaka)",
"key(mangaka)",
],
},
{
"#url" : "https://chan.sankakucomplex.com/post/show/f8ba89043078f0e4be2d9c46550b840a",
"#comment" : "md5 hexdigest instead of ID (#3952)",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
"#pattern" : r"https://s\.sankakucomplex\.com/data/f8/ba/f8ba89043078f0e4be2d9c46550b840a\.jpg",
"#count" : 1,
"id" : 33195194,
"md5": "f8ba89043078f0e4be2d9c46550b840a",
},
{
"#url" : "https://chan.sankakucomplex.com/posts/f8ba89043078f0e4be2d9c46550b840a",
"#comment" : "/posts/ instead of /post/show/ (#4688)",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
"#pattern" : r"https://s\.sankakucomplex\.com/data/f8/ba/f8ba89043078f0e4be2d9c46550b840a\.jpg",
"#count" : 1,
"id" : 33195194,
"md5": "f8ba89043078f0e4be2d9c46550b840a",
},
2023-11-24 02:41:52 +01:00
{
"#url" : "https://chan.sankakucomplex.com/en/posts/show/ac8e3b92ea328ce9cf7211e69c905bf9",
"#comment" : "/en/posts/show/HEX",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
"id" : 360451,
"md5": "ac8e3b92ea328ce9cf7211e69c905bf9",
},
2023-09-10 14:45:01 +02:00
{
"#url" : "https://chan.sankakucomplex.com/post/show/360451",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
},
{
"#url" : "https://chan.sankakucomplex.com/ja/post/show/360451",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
},
{
"#url" : "https://beta.sankakucomplex.com/post/show/360451",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
},
{
"#url" : "https://white.sankakucomplex.com/post/show/360451",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
},
{
"#url" : "https://black.sankakucomplex.com/post/show/360451",
"#category": ("booru", "sankaku", "post"),
"#class" : sankaku.SankakuPostExtractor,
},
{
"#url" : "https://sankaku.app/books?tags=aiue_oka",
"#category": ("booru", "sankaku", "books"),
"#class" : sankaku.SankakuBooksExtractor,
"#range" : "1-20",
"#count" : 20,
},
{
"#url" : "https://beta.sankakucomplex.com/books?tags=aiue_oka",
"#category": ("booru", "sankaku", "books"),
"#class" : sankaku.SankakuBooksExtractor,
},
)