[artstation] download '/8k/' images (#9003)

This commit is contained in:
Mike Fährmann
2026-02-05 16:45:55 +01:00
parent fdc59efdda
commit 04442e262e
2 changed files with 11 additions and 33 deletions

View File

@@ -5,68 +5,62 @@
# published by the Free Software Foundation.
from gallery_dl.extractor import artstation
from gallery_dl import exception
__tests__ = (
{
"#url" : "https://www.artstation.com/sungchoi/",
"#category": ("", "artstation", "user"),
"#class" : artstation.ArtstationUserExtractor,
"#pattern" : r"https://\w+\.artstation\.com/p/assets/images/images/\d+/\d+/\d+/(4k|large|medium|small)/[^/]+",
"#pattern" : r"https://\w+\.artstation\.com/p/assets/images/images/\d+/\d+/\d+/8k/[^/]+",
"#range" : "1-10",
"#count" : ">= 10",
},
{
"#url" : "https://www.artstation.com/sungchoi/albums/all/",
"#category": ("", "artstation", "user"),
"#class" : artstation.ArtstationUserExtractor,
},
{
"#url" : "https://sungchoi.artstation.com/",
"#category": ("", "artstation", "user"),
"#class" : artstation.ArtstationUserExtractor,
},
{
"#url" : "https://sungchoi.artstation.com/projects/",
"#category": ("", "artstation", "user"),
"#comment" : "alternate user URL format",
"#class" : artstation.ArtstationUserExtractor,
},
{
"#url" : "https://www.artstation.com/huimeiye/albums/770899",
"#category": ("", "artstation", "album"),
"#comment" : "'Hellboy' album",
"#class" : artstation.ArtstationAlbumExtractor,
"#count" : 2,
},
{
"#url" : "https://www.artstation.com/huimeiye/albums/770898",
"#category": ("", "artstation", "album"),
"#comment" : "non-existent album",
"#class" : artstation.ArtstationAlbumExtractor,
"#exception": exception.NotFoundError,
"#exception": "NotFoundError",
},
{
"#url" : "https://huimeiye.artstation.com/albums/770899",
"#category": ("", "artstation", "album"),
"#comment" : "alternate user URL format",
"#class" : artstation.ArtstationAlbumExtractor,
},
{
"#url" : "https://www.artstation.com/mikf/likes",
"#category": ("", "artstation", "likes"),
"#class" : artstation.ArtstationLikesExtractor,
"#pattern" : r"https://\w+\.artstation\.com/p/assets/images/images/\d+/\d+/\d+/(4k|large|medium|small)/[^/]+",
"#pattern" : r"https://\w+\.artstation\.com/p/assets/images/images/\d+/\d+/\d+/8k/[^/]+",
"#count" : 6,
},
{
"#url" : "https://www.artstation.com/mikf/collections/2647023",
"#category": ("", "artstation", "collection"),
"#class" : artstation.ArtstationCollectionExtractor,
"#count" : 10,
@@ -85,7 +79,6 @@ __tests__ = (
{
"#url" : "https://www.artstation.com/mikf/collections",
"#category": ("", "artstation", "collections"),
"#class" : artstation.ArtstationCollectionsExtractor,
"#results" : (
"https://www.artstation.com/mikf/collections/2647023",
@@ -105,20 +98,17 @@ __tests__ = (
{
"#url" : "https://www.artstation.com/sungchoi/likes",
"#comment" : "no likes",
"#category": ("", "artstation", "likes"),
"#class" : artstation.ArtstationLikesExtractor,
"#count" : 0,
},
{
"#url" : "https://www.artstation.com/contests/thu-2017/challenges/20",
"#category": ("", "artstation", "challenge"),
"#class" : artstation.ArtstationChallengeExtractor,
},
{
"#url" : "https://www.artstation.com/contests/beyond-human/challenges/23?sorting=winners",
"#category": ("", "artstation", "challenge"),
"#class" : artstation.ArtstationChallengeExtractor,
"#range" : "1-30",
"#count" : 30,
@@ -126,7 +116,6 @@ __tests__ = (
{
"#url" : "https://www.artstation.com/search?query=ancient&sort_by=rank",
"#category": ("", "artstation", "search"),
"#class" : artstation.ArtstationSearchExtractor,
"#range" : "1-20",
"#count" : 20,
@@ -134,7 +123,6 @@ __tests__ = (
{
"#url" : "https://www.artstation.com/artwork?sorting=latest",
"#category": ("", "artstation", "artwork"),
"#class" : artstation.ArtstationArtworkExtractor,
"#range" : "1-20",
"#count" : 20,
@@ -142,16 +130,14 @@ __tests__ = (
{
"#url" : "https://www.artstation.com/artwork/LQVJr",
"#category": ("", "artstation", "image"),
"#class" : artstation.ArtstationImageExtractor,
"#pattern" : r"https?://\w+\.artstation\.com/p/assets/images/images/008/760/279/4k/.+",
"#pattern" : r"https?://\w+\.artstation\.com/p/assets/images/images/008/760/279/8k/.+",
"#sha1_content": "3f211ce0d6ecdb502db2cdf7bbeceb11d8421170",
},
{
"#url" : "https://www.artstation.com/artwork/Db3dy",
"#comment" : "multiple images per project",
"#category": ("", "artstation", "image"),
"#class" : artstation.ArtstationImageExtractor,
"#count" : 4,
},
@@ -159,7 +145,6 @@ __tests__ = (
{
"#url" : "https://www.artstation.com/artwork/lR8b5k",
"#comment" : "artstation video clips (#2566)",
"#category": ("", "artstation", "image"),
"#class" : artstation.ArtstationImageExtractor,
"#options" : {"videos": True},
"#range" : "2-3",
@@ -185,7 +170,6 @@ __tests__ = (
{
"#url" : "https://www.artstation.com/artwork/g4WPK",
"#comment" : "embedded youtube video",
"#category": ("", "artstation", "image"),
"#class" : artstation.ArtstationImageExtractor,
"#options" : {"external": True},
"#pattern" : r"ytdl:https://www\.youtube(-nocookie)?\.com/embed/JNFfJtwwrU0",
@@ -195,27 +179,23 @@ __tests__ = (
{
"#url" : "https://www.artstation.com/artwork/3q3mXB",
"#comment" : "404 (#3016)",
"#category": ("", "artstation", "image"),
"#class" : artstation.ArtstationImageExtractor,
"#count" : 0,
"#exception": "NotFoundError",
},
{
"#url" : "https://sungchoi.artstation.com/projects/LQVJr",
"#comment" : "alternate URL patterns",
"#category": ("", "artstation", "image"),
"#class" : artstation.ArtstationImageExtractor,
},
{
"#url" : "https://artstn.co/p/LQVJr",
"#category": ("", "artstation", "image"),
"#class" : artstation.ArtstationImageExtractor,
},
{
"#url" : "https://www.artstation.com/sungchoi/following",
"#category": ("", "artstation", "following"),
"#class" : artstation.ArtstationFollowingExtractor,
"#pattern" : artstation.ArtstationUserExtractor.pattern,
"#count" : ">= 40",
@@ -224,21 +204,18 @@ __tests__ = (
{
"#url" : "https://fede-x-rojas.artstation.com/projects/WBdaZy",
"#comment" : "dash in username",
"#category": ("", "artstation", "image"),
"#class" : artstation.ArtstationImageExtractor,
},
{
"#url" : "https://fede-x-rojas.artstation.com/albums/8533110",
"#comment" : "dash in username",
"#category": ("", "artstation", "album"),
"#class" : artstation.ArtstationAlbumExtractor,
},
{
"#url" : "https://fede-x-rojas.artstation.com/",
"#comment" : "dash in username",
"#category": ("", "artstation", "user"),
"#class" : artstation.ArtstationUserExtractor,
},