Fix lofter strategy due to changes in their image urls

This commit is contained in:
nonamethanks
2021-08-08 15:46:30 +02:00
committed by evazion
parent 35c9eff5bc
commit f60fce614b
2 changed files with 1 additions and 5 deletions

View File

@@ -23,7 +23,6 @@ module Sources
PROFILE_URL = %r{\Ahttps?://(?<artist_name>[\w-]+).lofter.com}i
PAGE_URL = %r{#{PROFILE_URL}/post/(?<illust_id>[\w-]+)}i
IMAGE_HOST = %r{\Ahttps?://imglf\d\.(?:nosdn\d?\.12\d|lf127)\.net}i
IMAGE_URL = %r{#{IMAGE_HOST}/img/\w+\.\w+}i
def domains
["lofter.com", "lf127.net"]
@@ -39,7 +38,7 @@ module Sources
end
def image_url
if url =~ IMAGE_URL
if url =~ IMAGE_HOST
get_full_version(url)
else
image_urls.first