[youtube] Restrict embed regex (#14600)

This commit is contained in:
Sergey M․ 2017-10-27 22:26:43 +07:00
parent 7c1f419341
commit f2332f18e6
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -1391,7 +1391,7 @@ def _extract_urls(webpage):
)
(["\'])
(?P<url>(?:https?:)?//(?:www\.)?youtube(?:-nocookie)?\.com/
(?:embed|v|p)/.+?)
(?:embed|v|p)/[0-9A-Za-z_-]{11}.*?)
\1''', webpage)]
# lazyYT YouTube embed