[weibo] try 'replay_hd' URLs as video fallback (#8339)

This commit is contained in:
Mike Fährmann
2025-10-03 11:19:14 +02:00
parent 008a871ccb
commit faeec7e67f
2 changed files with 9 additions and 1 deletions

View File

@@ -148,7 +148,8 @@ class WeiboExtractor(Extractor):
media = max(info["playback_list"],
key=lambda m: m["meta"]["quality_index"])
except Exception:
return {"url": (info.get("stream_url_hd") or
return {"url": (info.get("replay_hd") or
info.get("stream_url_hd") or
info.get("stream_url") or "")}
else:
return media["play_info"].copy()

View File

@@ -308,6 +308,13 @@ __tests__ = (
"#class" : weibo.WeiboStatusExtractor,
},
{
"#url" : "https://weibo.com/7926989456/5160875674043425",
"#comment" : "'replay_hd' video (live replay #8339)",
"#class" : weibo.WeiboStatusExtractor,
"#results" : "ytdl:https://live.video.weibocdn.com/4817f457-c9be-47f7-a5a0-8591fd363cb1_index.m3u8",
},
{
"#url" : "https://weibo.com/7117031969/5208376084532264",
"#comment" : "'.m3u8' manifest (live replay #8339)",