From 434406a9820961433a530844fc2e5e75c1983e0a Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 23 Nov 2020 01:55:14 +0530 Subject: [PATCH] Cleanup YoutubeTabIE _VALID_URL regex --- youtube_dlc/extractor/youtube.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py index e24b9f3a4..30f1a024e 100644 --- a/youtube_dlc/extractor/youtube.py +++ b/youtube_dlc/extractor/youtube.py @@ -64,7 +64,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor): _TFA_URL = 'https://accounts.google.com/_/signin/challenge?hl=en&TL={0}' _RESERVED_NAMES = ( - r'course|embed|watch|w|results|storefront|' + r'course|embed|playlist|watch|w|results|storefront|' r'shared|index|account|reporthistory|t/terms|about|upload|signin|logout|' r'feed/(watch_later|history|subscriptions|library|trending|recommended)') @@ -2532,12 +2532,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor): class YoutubeTabIE(YoutubeBaseInfoExtractor): IE_DESC = 'YouTube.com tab' - _VALID_URL = ( - r'https?://(?:\w+\.)?(?:youtube(?:kids)?\.com|invidio\.us)/' - r'(?:(?!(%s)([/#?]|$))|' - r'(?:channel|c|user)/|' - r'(?:playlist|watch)\?.*?\blist=)' - r'(?P[^/?#&]+)') % YoutubeBaseInfoExtractor._RESERVED_NAMES + _VALID_URL = (r'''(?x) + https?://(?:\w+\.)?(?:youtube(?:kids)?\.com|invidio\.us)/(?: + (?!(%s)([/#?]|$))|channel/|c/|user/| + (?Pplaylist|watch)/?\?.*?\blist=) + (?P[^/?#&]+)''') % YoutubeBaseInfoExtractor._RESERVED_NAMES IE_NAME = 'youtube:tab' _TESTS = [{