summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/weibo.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-06-19 01:14:28 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2023-06-19 01:14:28 -0400
commit9fb906aeb3816abb42f459d1b67e35024e6f2348 (patch)
tree30b039301c783475c0f4d46b0e0c5ec9851b2567 /gallery_dl/extractor/weibo.py
parent8950c0f2ef55ec2ed36b3fccc9fd85b64b877c3b (diff)
New upstream version 1.25.6.upstream/1.25.6
Diffstat (limited to 'gallery_dl/extractor/weibo.py')
-rw-r--r--gallery_dl/extractor/weibo.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gallery_dl/extractor/weibo.py b/gallery_dl/extractor/weibo.py
index 2cbfad6..805aa53 100644
--- a/gallery_dl/extractor/weibo.py
+++ b/gallery_dl/extractor/weibo.py
@@ -72,6 +72,8 @@ class WeiboExtractor(Extractor):
file["url"] = "https:" + file["url"][5:]
if "filename" not in file:
text.nameext_from_url(file["url"], file)
+ if file["extension"] == "json":
+ file["extension"] = "mp4"
file["status"] = status
file["num"] = num
yield Message.Url, file["url"], file
@@ -123,7 +125,7 @@ class WeiboExtractor(Extractor):
key=lambda m: m["meta"]["quality_index"])
except Exception:
return {"url": (info.get("stream_url_hd") or
- info["stream_url"])}
+ info.get("stream_url") or "")}
else:
return media["play_info"].copy()