Fix #3637: Bookmarklet fails on artstation for some posts.
This commit is contained in:
@@ -7,10 +7,10 @@ module Sources::Strategies
|
|||||||
end
|
end
|
||||||
|
|
||||||
# https://www.artstation.com/artwork/04XA4
|
# https://www.artstation.com/artwork/04XA4
|
||||||
# https://dantewontdie.artstation.com/projects/YZK5q
|
|
||||||
# https://www.artstation.com/artwork/cody-from-sf
|
# https://www.artstation.com/artwork/cody-from-sf
|
||||||
|
# https://sa-dui.artstation.com/projects/DVERn
|
||||||
def self.project_id(url)
|
def self.project_id(url)
|
||||||
if url =~ %r!\Ahttps?://\w+\.artstation\.com/(?:artwork|projects)/(?<project_id>[a-z0-9-]+)\z!i
|
if url =~ %r!\Ahttps?://[a-z0-9-]+\.artstation\.com/(?:artwork|projects)/(?<project_id>[a-z0-9-]+)\z!i
|
||||||
$~[:project_id]
|
$~[:project_id]
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
|
|||||||
Reference in New Issue
Block a user