Commit d4460d1
Changed files (1)
src/networking.py
@@ -307,7 +307,8 @@ async def match_social_media_link(text: str, *, flatten_first: bool = True) -> d
# weibo video first, then weibo post
# https://video.weibo.com/show?fid=1034:5123779299311660
- if matched := re.search(r"(https?://)?video\.weibo\.(:?com|cn)/show\?fid=(\d+):(\d+)", text):
+ # https://h5.video.weibo.com/show/1034:5169532881535051
+ if matched := re.search(r"(https?://)?(h5\.)?video\.weibo\.(:?com|cn)/show(\?fid=|\/)(\d+):(\d+)", text):
return {"post_id": f"weibovideo{matched.group(3)}:{matched.group(4)}", "url": https_url(matched.group(0)), "db_key": bare_url(matched.group(0)), "platform": "weibo"}
# https://weibo.com/tv/show/1034:5123779299311660?from=old_pc_videoshow
if matched := re.search(r"(https?://)?(www\.)?weibo\.(:?com|cn)/tv/show/(\d+):(\d+)", text):