Skip to content

Commit faeec7e

Browse files
committed
[weibo] try 'replay_hd' URLs as video fallback (#8339)
1 parent 008a871 commit faeec7e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

gallery_dl/extractor/weibo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def _extract_video(self, info):
148148
media = max(info["playback_list"],
149149
key=lambda m: m["meta"]["quality_index"])
150150
except Exception:
151-
return {"url": (info.get("stream_url_hd") or
151+
return {"url": (info.get("replay_hd") or
152+
info.get("stream_url_hd") or
152153
info.get("stream_url") or "")}
153154
else:
154155
return media["play_info"].copy()

test/results/weibo.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,13 @@
308308
"#class" : weibo.WeiboStatusExtractor,
309309
},
310310

311+
{
312+
"#url" : "https://weibo.com/7926989456/5160875674043425",
313+
"#comment" : "'replay_hd' video (live replay #8339)",
314+
"#class" : weibo.WeiboStatusExtractor,
315+
"#results" : "ytdl:https://live.video.weibocdn.com/4817f457-c9be-47f7-a5a0-8591fd363cb1_index.m3u8",
316+
},
317+
311318
{
312319
"#url" : "https://weibo.com/7117031969/5208376084532264",
313320
"#comment" : "'.m3u8' manifest (live replay #8339)",

0 commit comments

Comments
 (0)