From 8fc6fbfa343766ba162952f310d60555fc0dfaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 9 Feb 2019 16:17:46 +0100 Subject: [PATCH] [artstation] recognize shortened project URLs https://artstn.co/p/ --- gallery_dl/extractor/artstation.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/artstation.py b/gallery_dl/extractor/artstation.py index 0d2806e2..7dbb196d 100644 --- a/gallery_dl/extractor/artstation.py +++ b/gallery_dl/extractor/artstation.py @@ -303,8 +303,9 @@ class ArtstationSearchExtractor(ArtstationExtractor): class ArtstationImageExtractor(ArtstationExtractor): """Extractor for images from a single artstation project""" subcategory = "image" - pattern = (r"(?:https?://)?(?:\w+\.)?artstation\.com" - r"/(?:artwork|projects|search)/(\w+)") + pattern = (r"(?:https?://)?(?:" + r"(?:\w+\.)?artstation\.com/(?:artwork|projects|search)" + r"|artstn\.co/p)/(\w+)") test = ( ("https://www.artstation.com/artwork/LQVJr", { "pattern": r"https?://\w+\.artstation\.com/p/assets" @@ -323,8 +324,9 @@ class ArtstationImageExtractor(ArtstationExtractor): "options": (("external", True),), "pattern": "ytdl:https://www.youtube.com/embed/JNFfJtwwrU0", }), - # different URL pattern + # alternate URL patterns ("https://sungchoi.artstation.com/projects/LQVJr"), + ("https://artstn.co/p/LQVJr"), ) def __init__(self, match):