mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[newgrounds] add more fallback URLs for 'art-images' files
This commit is contained in:
parent
f3f27496d6
commit
7d0e5877ce
@ -244,9 +244,12 @@ class NewgroundsExtractor(Extractor):
|
||||
url = text.ensure_http_scheme(url)
|
||||
url = url.replace("/medium_views/", "/images/", 1)
|
||||
if text.ext_from_url(url) == "webp":
|
||||
fallback = [url.replace(".webp", "." + e)
|
||||
for e in ("jpg", "png", "gif") if e != ext]
|
||||
fallback.append(url)
|
||||
yield {
|
||||
"image" : url.replace(".webp", "." + ext),
|
||||
"_fallback": (url,),
|
||||
"_fallback": fallback,
|
||||
}
|
||||
else:
|
||||
yield {"image": url}
|
||||
|
Loading…
Reference in New Issue
Block a user