[youtube:tab] Improve URL matching (closes #27559)
authorSergey M․ <dstftw@gmail.com>
Mon, 28 Dec 2020 19:19:43 +0000 (02:19 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 28 Dec 2020 19:19:43 +0000 (02:19 +0700)
youtube_dl/extractor/youtube.py

index 77f128285b51b604b5105d7af1a146bdbf7b7938..0044ed9097f401493357987abd50965cec8ac157 100644 (file)
@@ -1103,6 +1103,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                 'skip_download': True,
             },
         },
+        {
+            'url': 'https://www.youtube.com/watch_popup?v=63RmMXCd_bQ',
+            'only_matching': True,
+        },
     ]
 
     def __init__(self, *args, **kwargs):
@@ -2730,6 +2734,11 @@ class YoutubeTabIE(YoutubeBaseInfoExtractor):
         'only_matching': True,
     }]
 
+    @classmethod
+    def suitable(cls, url):
+        return False if YoutubeIE.suitable(url) else super(
+            YoutubeTabIE, cls).suitable(url)
+
     def _extract_channel_id(self, webpage):
         channel_id = self._html_search_meta(
             'channelId', webpage, 'channel id', default=None)