mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Cleanup YoutubeTabIE _VALID_URL regex
This commit is contained in:
parent
386e1dd908
commit
434406a982
1 changed files with 6 additions and 7 deletions
|
@ -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 @@ def decrypt_sig(mobj):
|
|||
|
||||
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<id>[^/?#&]+)') % YoutubeBaseInfoExtractor._RESERVED_NAMES
|
||||
_VALID_URL = (r'''(?x)
|
||||
https?://(?:\w+\.)?(?:youtube(?:kids)?\.com|invidio\.us)/(?:
|
||||
(?!(%s)([/#?]|$))|channel/|c/|user/|
|
||||
(?P<not_channel>playlist|watch)/?\?.*?\blist=)
|
||||
(?P<id>[^/?#&]+)''') % YoutubeBaseInfoExtractor._RESERVED_NAMES
|
||||
IE_NAME = 'youtube:tab'
|
||||
|
||||
_TESTS = [{
|
||||
|
|
Loading…
Reference in a new issue