pixiv: remove obsolete edgesuite.net rewrite rule.
This CDN hasn't been seen for several years. ref: https://danbooru.donmai.us/forum_topics/10766
This commit is contained in:
@@ -45,8 +45,7 @@ module Sources
|
||||
end
|
||||
|
||||
def image_urls
|
||||
image_urls_sub.
|
||||
map {|x| rewrite_cdn(x)}
|
||||
image_urls_sub
|
||||
rescue PixivApiClient::BadIDError
|
||||
[url]
|
||||
end
|
||||
@@ -172,14 +171,6 @@ module Sources
|
||||
return metadata.pages
|
||||
end
|
||||
|
||||
def rewrite_cdn(x)
|
||||
if x =~ %r{\Ahttps?:\/\/(?:\w+\.)?pixiv\.net\.edgesuite\.net}
|
||||
return x.sub(".edgesuite.net", "")
|
||||
end
|
||||
|
||||
return x
|
||||
end
|
||||
|
||||
# in order to prevent recursive loops, this method should not make any
|
||||
# api calls and only try to extract the illust_id from the url. therefore,
|
||||
# even though it makes sense to reference page_url here, it will only look
|
||||
|
||||
Reference in New Issue
Block a user