Testing new regex

pull/1158/head
RiveN 3 years ago committed by GitHub
parent 3a93892a22
commit 7e650dcf75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -64,7 +64,7 @@ def add_background():
# Validate YouTube URI
regex = re.compile(
r"(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([\w\-_]+)\&?"
r"(?:\/|%3D|v=|vi=)([0-9A-z-_]{11})(?:[%#?&]|$)"
).search(youtube_uri)
if not regex:

Loading…
Cancel
Save