[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

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