1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-21 18:22:30 +01:00

[flickr] fix video download URLs (#6464)

continuation of 0e18fa395d
fix video detection in '_file_url'
This commit is contained in:
Mike Fährmann 2024-11-13 18:16:26 +01:00
parent cd6d6ea8be
commit b62c466c14
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -57,10 +57,12 @@ class FlickrExtractor(Extractor):
"""Return an iterable with all relevant photo objects"""
def _file_url(self, photo):
if "video" in photo:
return photo["url"]
url = photo["url"]
path, _, ext = photo["url"].rpartition(".")
if "/video/" in url:
return url
path, _, ext = url.rpartition(".")
return path + "_d." + ext