Source::URL: add profile_url method.

Add a method for converting a source URL into a profile URL. This will
be used for normalizing profile URLs in artist entries.

Also add the ability to parse a few more profile URL formats.
This commit is contained in:
evazion
2022-03-12 03:08:06 -06:00
parent 787b5c8e27
commit 9343f7c912
20 changed files with 154 additions and 26 deletions

View File

@@ -42,4 +42,8 @@ class Source::URL::Lofter < Source::URL
def full_image_url
"#{site}#{path}" if image_url?
end
def profile_url
"https://#{username}.lofter.com" if username.present?
end
end