update extractor test results

This commit is contained in:
Mike Fährmann
2022-04-18 17:24:00 +02:00
parent ad5a4b1756
commit 1f9a0e2fd8
6 changed files with 25 additions and 22 deletions

View File

@@ -417,8 +417,8 @@ class DeviantartGalleryExtractor(DeviantartExtractor):
pattern = BASE_PATTERN + r"/gallery(?:/all|/?\?catpath=)?/?$" pattern = BASE_PATTERN + r"/gallery(?:/all|/?\?catpath=)?/?$"
test = ( test = (
("https://www.deviantart.com/shimoda7/gallery/", { ("https://www.deviantart.com/shimoda7/gallery/", {
"pattern": r"https://(api-da\.wixmp\.com/_api/download/file" "pattern": r"https://(images-)?wixmp-[^.]+\.wixmp\.com"
r"|images-wixmp-[^.]+.wixmp.com/f/.+/.+.jpg\?token=.+)", r"/f/.+/.+\.(jpg|png)\?token=.+",
"count": ">= 30", "count": ">= 30",
"keyword": { "keyword": {
"allows_comments": bool, "allows_comments": bool,
@@ -563,7 +563,8 @@ class DeviantartStashExtractor(DeviantartExtractor):
pattern = r"(?:https?://)?sta\.sh/([a-z0-9]+)" pattern = r"(?:https?://)?sta\.sh/([a-z0-9]+)"
test = ( test = (
("https://sta.sh/022c83odnaxc", { ("https://sta.sh/022c83odnaxc", {
"pattern": r"https://api-da\.wixmp\.com/_api/download/file", "pattern": r"https://wixmp-[^.]+\.wixmp\.com"
r"/f/.+/.+\.png\?token=.+",
"content": "057eb2f2861f6c8a96876b13cca1a4b7a408c11f", "content": "057eb2f2861f6c8a96876b13cca1a4b7a408c11f",
"count": 1, "count": 1,
}), }),
@@ -574,7 +575,8 @@ class DeviantartStashExtractor(DeviantartExtractor):
}), }),
# downloadable, but no "content" field (#307) # downloadable, but no "content" field (#307)
("https://sta.sh/024t4coz16mi", { ("https://sta.sh/024t4coz16mi", {
"pattern": r"https://api-da\.wixmp\.com/_api/download/file", "pattern": r"https://wixmp-[^.]+\.wixmp\.com"
r"/f/.+/.+\.rar\?token=.+",
"count": 1, "count": 1,
}), }),
# mixed folders and images (#659) # mixed folders and images (#659)
@@ -863,8 +865,9 @@ class DeviantartDeviationExtractor(DeviantartExtractor):
}), }),
(("https://www.deviantart.com/myria-moon/art/Aime-Moi-261986576"), { (("https://www.deviantart.com/myria-moon/art/Aime-Moi-261986576"), {
"options": (("comments", True),), "options": (("comments", True),),
"pattern": r"https://api-da\.wixmp\.com/_api/download/file",
"keyword": {"comments": list}, "keyword": {"comments": list},
"pattern": r"https://wixmp-[^.]+\.wixmp\.com"
r"/f/.+/.+\.jpg\?token=.+",
}), }),
# wixmp URL rewrite # wixmp URL rewrite
(("https://www.deviantart.com/citizenfresh/art/Hverarond-789295466"), { (("https://www.deviantart.com/citizenfresh/art/Hverarond-789295466"), {
@@ -878,8 +881,8 @@ class DeviantartDeviationExtractor(DeviantartExtractor):
}), }),
# Flash animation with GIF preview (#1731) # Flash animation with GIF preview (#1731)
("https://www.deviantart.com/yuumei/art/Flash-Comic-214724929", { ("https://www.deviantart.com/yuumei/art/Flash-Comic-214724929", {
"pattern": r"https://api-da\.wixmp\.com/_api/download" "pattern": r"https://wixmp-[^.]+\.wixmp\.com"
r"/file\?downloadToken=.+", r"/f/.+/.+\.swf\?token=.+",
"keyword": { "keyword": {
"filename": "flash_comic_tutorial_by_yuumei-d3juatd", "filename": "flash_comic_tutorial_by_yuumei-d3juatd",
"extension": "swf", "extension": "swf",

View File

@@ -122,7 +122,7 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
"date": "dt:2018-03-18 20:15:00", "date": "dt:2018-03-18 20:15:00",
"eh_category": "Non-H", "eh_category": "Non-H",
"expunged": False, "expunged": False,
"favorites": "20", "favorites": "21",
"filecount": "4", "filecount": "4",
"filesize": 1488978, "filesize": 1488978,
"gid": 1200119, "gid": 1200119,

View File

@@ -1,12 +1,12 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2015-2020 Mike Fährmann # Copyright 2015-2022 Mike Fährmann
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation. # published by the Free Software Foundation.
"""Extract images from https://nijie.info/""" """Extractors for https://nijie.info/"""
from .common import Extractor, Message, AsynchronousMixin from .common import Extractor, Message, AsynchronousMixin
from .. import text, exception from .. import text, exception
@@ -151,7 +151,7 @@ class NijieIllustrationExtractor(NijieExtractor):
pattern = BASE_PATTERN + r"/members_illust\.php\?id=(\d+)" pattern = BASE_PATTERN + r"/members_illust\.php\?id=(\d+)"
test = ( test = (
("https://nijie.info/members_illust.php?id=44", { ("https://nijie.info/members_illust.php?id=44", {
"url": "66c4ff94c6e77c0765dd88f2d8c663055fda573e", "url": "1553e5144df50a676f5947d02469299b401ad6c0",
"keyword": { "keyword": {
"artist_id": 44, "artist_id": 44,
"artist_name": "ED", "artist_name": "ED",
@@ -163,7 +163,7 @@ class NijieIllustrationExtractor(NijieExtractor):
"num": int, "num": int,
"tags": list, "tags": list,
"title": str, "title": str,
"url": r"re:https://pic.nijie.net/\d+/nijie_picture/.*jpg$", "url": r"re:https://pic.nijie.net/\d+/nijie/.*jpg$",
"user_id": 44, "user_id": 44,
"user_name": "ED", "user_name": "ED",
}, },
@@ -223,8 +223,8 @@ class NijieImageExtractor(NijieExtractor):
pattern = BASE_PATTERN + r"/view(?:_popup)?\.php\?id=(\d+)" pattern = BASE_PATTERN + r"/view(?:_popup)?\.php\?id=(\d+)"
test = ( test = (
("https://nijie.info/view.php?id=70720", { ("https://nijie.info/view.php?id=70720", {
"url": "5497f897311397dafa188521258624346a0af2a3", "url": "3d654e890212ba823c9647754767336aebc0a743",
"keyword": "fd12bca6f4402a0c996315d28c65f7914ad70c51", "keyword": "41da5d0e178b04f01fe72460185df52fadc3c91b",
"content": "d85e3ea896ed5e4da0bca2390ad310a4df716ca6", "content": "d85e3ea896ed5e4da0bca2390ad310a4df716ca6",
}), }),
("https://nijie.info/view.php?id=70724", { ("https://nijie.info/view.php?id=70724", {

View File

@@ -115,9 +115,9 @@ class UnsplashImageExtractor(UnsplashExtractor):
"id": "uMJXuywXLiU", "id": "uMJXuywXLiU",
"instagram_username": "just_midwest_rock", "instagram_username": "just_midwest_rock",
"last_name": "Hoefler", "last_name": "Hoefler",
"location": "Madison, WI", "location": None,
"name": "Dave Hoefler", "name": "Dave Hoefler",
"portfolio_url": str, "portfolio_url": None,
"total_collections": int, "total_collections": int,
"total_likes": int, "total_likes": int,
"total_photos": int, "total_photos": int,

View File

@@ -76,8 +76,8 @@ class VkPhotosExtractor(VkExtractor):
r"|(?!album-?\d+_)([^/?#]+))") r"|(?!album-?\d+_)([^/?#]+))")
test = ( test = (
("https://vk.com/id398982326", { ("https://vk.com/id398982326", {
"pattern": r"https://sun\d+-\d+\.userapi\.com/sun\d+-\d+" "pattern": r"https://sun\d+-\d+\.userapi\.com"
r"/c\d+/v\d+/[0-9a-f]+/[\w-]+\.jpg", r"/\w+/v\d+/[0-9a-f]+/[\w-]+\.jpg",
"count": ">= 35", "count": ">= 35",
"keywords": { "keywords": {
"id": r"re:\d+", "id": r"re:\d+",
@@ -146,8 +146,8 @@ class VkAlbumExtractor(VkExtractor):
directory_fmt = ("{category}", "{user[id]}", "{album[id]}") directory_fmt = ("{category}", "{user[id]}", "{album[id]}")
pattern = BASE_PATTERN + r"/album(-?\d+)_(\d+)$" pattern = BASE_PATTERN + r"/album(-?\d+)_(\d+)$"
test = ( test = (
("https://vk.com/album221469416_0", { ("https://vk.com/album232175027_00", {
"count": 3, "count": 8,
}), }),
("https://vk.com/album-165740836_281339889", { ("https://vk.com/album-165740836_281339889", {
"count": 12, "count": 12,

View File

@@ -70,8 +70,8 @@ class WikiartArtistExtractor(WikiartExtractor):
directory_fmt = ("{category}", "{artist[artistName]}") directory_fmt = ("{category}", "{artist[artistName]}")
pattern = BASE_PATTERN + r"/(?!\w+-by-)([\w-]+)/?$" pattern = BASE_PATTERN + r"/(?!\w+-by-)([\w-]+)/?$"
test = ("https://www.wikiart.org/en/thomas-cole", { test = ("https://www.wikiart.org/en/thomas-cole", {
"url": "8514d743382720e6fdab7c9a73faf9e1ec940cfb", "url": "6844f207a5063c499fc1d5651b03127bc4fe2f73",
"keyword": "58037afba35bfd7b4101c2316975a75d4ee92a68", "keyword": "09230b5f504697119e267349bf92487e657a7384",
}) })
def __init__(self, match): def __init__(self, match):