Adapt for youtube shorts
This commit is contained in:
@@ -33,7 +33,7 @@ def get_youtube_id(url):
|
|||||||
youtube_regex = (
|
youtube_regex = (
|
||||||
r'(https?://)?(www\.)?'
|
r'(https?://)?(www\.)?'
|
||||||
'(youtube|youtu|youtube-nocookie)\.(com|be)/'
|
'(youtube|youtu|youtube-nocookie)\.(com|be)/'
|
||||||
'(watch\?v=|embed/|v/|.+\?v=)?([^&=%\?]{11})')
|
'(watch\?v=|embed/|shorts/|v/|.+\?v=)?([^&=%\?]{11})')
|
||||||
|
|
||||||
youtube_regex_match = re.match(youtube_regex, url)
|
youtube_regex_match = re.match(youtube_regex, url)
|
||||||
if youtube_regex_match:
|
if youtube_regex_match:
|
||||||
|
|||||||
Reference in New Issue
Block a user