1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-09 06:48:30 +00:00

improve regex

This commit is contained in:
grqx_wsl 2024-11-04 14:19:52 +13:00
parent 9a6f9843c0
commit 901e78af62

View File

@ -165,9 +165,7 @@ def _extract_embed_urls(cls, url, webpage):
<a
(?:\s(?:[^>"']|"[^"]*"|'[^']*')*)?
(?<=\s)href\s*=\s*(?P<_q>['"])
(?:
(?!javascript:)(?P<href>/(?:{media_types})/\d+/?[\-a-zA-Z=?&#:;@]*)
)
(?!javascript:)(?P<href>/(?:{media_types})/\d+/?[\-\w=?&#:;@]*)
(?P=_q)
(?:\s(?:[^>"']|"[^"]*"|'[^']*')*)?
>''', webpage):