youtube_parser: support Invidious URLs

This commit is contained in:
dece 2022-03-06 17:26:48 +01:00
parent ed26c70095
commit 0a304f9b6c

View file

@ -12,7 +12,7 @@ from edmond.plugin import Plugin
class YoutubeParserPlugin(Plugin):
VIDEO_URL_RE = re.compile(
r"https?:\/\/(?:www\.youtube\.com\/watch\?(?:.*&)?v=(?P<code1>[^&\s]+)"
r"https?:\/\/(?:[^/]+/watch\?(?:.*&)?v=(?P<code1>[^&\s]+)"
r"|youtu\.be/(?P<code2>[^&\s]+))"
)