gelbooru: fix exception in md5-based post urls.

Fix exception when trying to get the image URL for sources like
https://gelbooru.com/index.php?page=post&s=list&md5=04f2767c64593c3030ce74ecc2528704.
This commit is contained in:
evazion
2022-10-11 01:31:49 -05:00
parent f05268df7f
commit 8fbc6d1d3a
2 changed files with 14 additions and 1 deletions

View File

@@ -59,7 +59,7 @@ module Source
end
memoize def post_id_from_md5
return nil unless parsed_url.image_url? && parsed_url.page_url.present?
return nil unless parsed_url.page_url.present?
response = http.cache(1.minute).head(parsed_url.page_url)
return nil unless response.status == 200