[imgur] strip trailing '?1' from 'ext'
This commit is contained in:
@@ -30,6 +30,7 @@ class ImgurExtractor(Extractor):
|
|||||||
return self._clean(json.loads(data))
|
return self._clean(json.loads(data))
|
||||||
|
|
||||||
def _prepare(self, image):
|
def _prepare(self, image):
|
||||||
|
image["ext"] = image["ext"].partition("?")[0]
|
||||||
if image["ext"] == ".gif" and (
|
if image["ext"] == ".gif" and (
|
||||||
(self.mp4 and image["prefer_video"]) or self.mp4 == "always"):
|
(self.mp4 and image["prefer_video"]) or self.mp4 == "always"):
|
||||||
image["ext"] = ".mp4"
|
image["ext"] = ".mp4"
|
||||||
|
|||||||
Reference in New Issue
Block a user