We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab8807b commit 8914692Copy full SHA for 8914692
yt_summarizer.py
@@ -7,7 +7,7 @@
7
8
9
def check_link(link):
10
- yt_regex = r"(https?://)?(www\.)?(youtube\.com/watch\?v=|youtu\.be/)[\w-]+"
+ yt_regex = r"^(?:https?:\/\/)?(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]+)(?:\?.*)?$"
11
return re.match(yt_regex, link) is not None
12
13
0 commit comments