diff options
| author | 2024-02-20 02:31:10 -0500 | |
|---|---|---|
| committer | 2024-02-20 02:31:10 -0500 | |
| commit | 01166fa52707cc282467427cf0e65c1b8983c4be (patch) | |
| tree | 7f61e0de7e76a7a226bb6e05e4e3d181e11f673a /gallery_dl/extractor/weibo.py | |
| parent | 12e23f1195164dcb740d6d4a4287e762c9e5e534 (diff) | |
New upstream version 1.26.8.upstream/1.26.8
Diffstat (limited to 'gallery_dl/extractor/weibo.py')
| -rw-r--r-- | gallery_dl/extractor/weibo.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gallery_dl/extractor/weibo.py b/gallery_dl/extractor/weibo.py index 3bd0648..5b45148 100644 --- a/gallery_dl/extractor/weibo.py +++ b/gallery_dl/extractor/weibo.py @@ -33,6 +33,8 @@ class WeiboExtractor(Extractor): self.retweets = self.config("retweets", True) self.videos = self.config("videos", True) self.livephoto = self.config("livephoto", True) + self.gifs = self.config("gifs", True) + self.gifs_video = (self.gifs == "video") cookies = _cookie_cache() if cookies is not None: @@ -106,8 +108,11 @@ class WeiboExtractor(Extractor): pic = pics[pic_id] pic_type = pic.get("type") - if pic_type == "gif" and self.videos: - append({"url": pic["video"]}) + if pic_type == "gif" and self.gifs: + if self.gifs_video: + append({"url": pic["video"]}) + else: + append(pic["largest"].copy()) elif pic_type == "livephoto" and self.livephoto: append(pic["largest"].copy()) |
