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:
evazion
2018-09-04 13:12:42 -05:00
parent 4bbe09762d
commit 5c457fbe51

View File

@@ -45,8 +45,7 @@ module Sources
end end
def image_urls def image_urls
image_urls_sub. image_urls_sub
map {|x| rewrite_cdn(x)}
rescue PixivApiClient::BadIDError rescue PixivApiClient::BadIDError
[url] [url]
end end
@@ -172,14 +171,6 @@ module Sources
return metadata.pages return metadata.pages
end 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 # 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, # 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 # even though it makes sense to reference page_url here, it will only look