diff --git a/gallery_dl/extractor/weibo.py b/gallery_dl/extractor/weibo.py index b681002f..9885d79f 100644 --- a/gallery_dl/extractor/weibo.py +++ b/gallery_dl/extractor/weibo.py @@ -126,15 +126,7 @@ class WeiboExtractor(Extractor): elif pic_type == "livephoto" and self.livephoto: append(pic["largest"].copy()) - - url = pic["video"] - fname, _, ext = ( - url.rpartition("%2F")[2] - if "%2F" in url else - text.filename_from_url(url) - ).rpartition(".") - - append({"url": url, "filename": fname, "extension": ext}) + append({"url": pic["video"]}) else: append(pic["largest"].copy()) diff --git a/test/results/weibo.py b/test/results/weibo.py index a27a26e9..e9d8d644 100644 --- a/test/results/weibo.py +++ b/test/results/weibo.py @@ -231,7 +231,7 @@ __tests__ = ( "#comment" : "type == livephoto (#2146, #6471)", "#category": ("", "weibo", "status"), "#class" : weibo.WeiboStatusExtractor, - "#pattern" : r"https://livephoto\.us\.sinaimg\.cn/\w+\.mov\?Expires=\d+&ssig=\w+&KID=unistore,video", + "#pattern" : r"https://livephoto\.us\.sinaimg\.cn/\w+\.mov\?Expires=\d+&ssig=[^&#]+&KID=unistore,video", "#range" : "2,4", "filename" : {"000yfKhRjx08hBAXxdZ60f0f0100tBPr0k01", "000GEYrCjx08hBAXUFo40f0f0100vS5G0k01"},