[imgur] strip trailing '?1' from 'ext'

This commit is contained in:
Mike Fährmann 2018-02-10 21:29:40 +01:00
parent cf147dfee9
commit 7e0207bcf4
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -30,6 +30,7 @@ class ImgurExtractor(Extractor):
return self._clean(json.loads(data))
def _prepare(self, image):
image["ext"] = image["ext"].partition("?")[0]
if image["ext"] == ".gif" and (
(self.mp4 and image["prefer_video"]) or self.mp4 == "always"):
image["ext"] = ".mp4"