Fix #5140: Unexpected error: PublicSuffix::DomainInvalid for searching some newgrounds urls in /artists
When the artist name couldn't found for a Newgrounds URL, for example for `https://www.newgrounds.com/dump/item`, then the `profile_url` method erroneously returned `https://.newgrounds.com`. This led to an error later on when the artist finder tried to parse the invalid URL. Also fix `strategy_should_work` to test that the profile URL is a valid URL, and not to try to download the file when image_urls is empty.
This commit is contained in:
@@ -60,7 +60,7 @@ module Source
|
||||
def profile_url
|
||||
# user names are not mutable, artist names are.
|
||||
# However we need the latest name for normalization
|
||||
"https://#{artist_name}.newgrounds.com"
|
||||
"https://#{artist_name}.newgrounds.com" if artist_name.present?
|
||||
end
|
||||
|
||||
def artist_commentary_title
|
||||
|
||||
Reference in New Issue
Block a user