[artstation] fix handling usernames with dashes
This commit is contained in:
@@ -175,7 +175,7 @@ class ArtstationUserExtractor(ArtstationExtractor):
|
|||||||
subcategory = "user"
|
subcategory = "user"
|
||||||
pattern = (r"(?:https?://)?(?:(?:www\.)?artstation\.com"
|
pattern = (r"(?:https?://)?(?:(?:www\.)?artstation\.com"
|
||||||
r"/(?!artwork|projects|search)([^/?#]+)(?:/albums/all)?"
|
r"/(?!artwork|projects|search)([^/?#]+)(?:/albums/all)?"
|
||||||
r"|((?!www)\w+)\.artstation\.com(?:/projects)?)/?$")
|
r"|((?!www)[\w-]+)\.artstation\.com(?:/projects)?)/?$")
|
||||||
example = "https://www.artstation.com/USER"
|
example = "https://www.artstation.com/USER"
|
||||||
|
|
||||||
def projects(self):
|
def projects(self):
|
||||||
@@ -192,7 +192,7 @@ class ArtstationAlbumExtractor(ArtstationExtractor):
|
|||||||
archive_fmt = "a_{album[id]}_{asset[id]}"
|
archive_fmt = "a_{album[id]}_{asset[id]}"
|
||||||
pattern = (r"(?:https?://)?(?:(?:www\.)?artstation\.com"
|
pattern = (r"(?:https?://)?(?:(?:www\.)?artstation\.com"
|
||||||
r"/(?!artwork|projects|search)([^/?#]+)"
|
r"/(?!artwork|projects|search)([^/?#]+)"
|
||||||
r"|((?!www)\w+)\.artstation\.com)/albums/(\d+)")
|
r"|((?!www)[\w-]+)\.artstation\.com)/albums/(\d+)")
|
||||||
example = "https://www.artstation.com/USER/albums/12345"
|
example = "https://www.artstation.com/USER/albums/12345"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
@@ -355,7 +355,7 @@ class ArtstationImageExtractor(ArtstationExtractor):
|
|||||||
"""Extractor for images from a single artstation project"""
|
"""Extractor for images from a single artstation project"""
|
||||||
subcategory = "image"
|
subcategory = "image"
|
||||||
pattern = (r"(?:https?://)?(?:"
|
pattern = (r"(?:https?://)?(?:"
|
||||||
r"(?:\w+\.)?artstation\.com/(?:artwork|projects|search)"
|
r"(?:[\w-]+\.)?artstation\.com/(?:artwork|projects|search)"
|
||||||
r"|artstn\.co/p)/(\w+)")
|
r"|artstn\.co/p)/(\w+)")
|
||||||
example = "https://www.artstation.com/artwork/abcde"
|
example = "https://www.artstation.com/artwork/abcde"
|
||||||
|
|
||||||
|
|||||||
@@ -157,4 +157,25 @@ __tests__ = (
|
|||||||
"#count" : ">= 40",
|
"#count" : ">= 40",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#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,
|
||||||
|
},
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user