diff --git a/gallery_dl/extractor/weibo.py b/gallery_dl/extractor/weibo.py index 5b451489..ab90c0ba 100644 --- a/gallery_dl/extractor/weibo.py +++ b/gallery_dl/extractor/weibo.py @@ -118,7 +118,7 @@ class WeiboExtractor(Extractor): append(pic["largest"].copy()) file = {"url": pic["video"]} - file["filehame"], _, file["extension"] = \ + file["filename"], _, file["extension"] = \ pic["video"].rpartition("%2F")[2].rpartition(".") append(file) diff --git a/test/results/weibo.py b/test/results/weibo.py index 8534c10b..992d2c93 100644 --- a/test/results/weibo.py +++ b/test/results/weibo.py @@ -209,8 +209,10 @@ __tests__ = ( "#comment" : "type == livephoto (#2146)", "#category": ("", "weibo", "status"), "#class" : weibo.WeiboStatusExtractor, - "#pattern" : r"https://video\.weibo\.com/media/play\?livephoto=https%3A%2F%2Fus.sinaimg.cn%2F\w+\.mov", + "#pattern" : r"https://video\.weibo\.com/media/play\?livephoto=https%3A%2F%2Fus\.sinaimg\.cn%2F\w+\.mov", "#range" : "2,4,6", + + "extension": "mov", }, { @@ -219,6 +221,8 @@ __tests__ = ( "#category": ("", "weibo", "status"), "#class" : weibo.WeiboStatusExtractor, "#urls" : "https://wx4.sinaimg.cn/large/68d80d22gy1h2ryfa8k0kg208w06o7wh.gif", + + "extension": "gif", }, {