weibo: fix https://m.weibo.cn/detail/1234 urls not finding the artist.

Fix https://m.weibo.cn/detail/4506950043618873 type URLs not finding the
artist because the profile_url method returned nil instead of the actual
profile URL.
This commit is contained in:
evazion
2022-03-18 05:51:59 -05:00
parent 03d2098d6d
commit a78b6528dc
2 changed files with 6 additions and 1 deletions

View File

@@ -53,13 +53,17 @@ module Sources
end
def profile_url
profile_urls.first
"https://www.weibo.com/u/#{artist_id}" if artist_id.present?
end
def artist_name
api_response&.dig("user", "screen_name")
end
def artist_id
parsed_url.artist_short_id || parsed_referer&.artist_short_id || api_response&.dig("user", "id")
end
def artist_commentary_desc
return if api_response.blank?