sources: add image_url?, page_url?, and profile_url? methods.

Add methods to Source::URL for determining whether a URL is an image
URL, a page URL, or a profile URL.

Also add more source URL tests and fix various URL parsing bugs.
This commit is contained in:
evazion
2022-05-01 17:55:58 -05:00
parent d54ad9103b
commit 23b8350320
47 changed files with 571 additions and 165 deletions

View File

@@ -70,7 +70,7 @@ class Source::URL::Fantia < Source::URL
end
def image_url?
@full_image_url.present?
@full_image_url.present? || downloadable?
end
def downloadable?