]> jfr.im git - yt-dlp.git/commitdiff
[tv2] Expand valid URL
authorpukkandan <redacted>
Tue, 23 Nov 2021 11:45:41 +0000 (17:15 +0530)
committerpukkandan <redacted>
Tue, 23 Nov 2021 15:04:25 +0000 (20:34 +0530)
Closes #1764

yt_dlp/extractor/tv2.py

index e0851531cbec7f00460e7eb3d18a22ae707e3e14..da351eeb0e7e709ffdc63ad65d6df2e2b7b3d777 100644 (file)
@@ -19,7 +19,7 @@
 
 
 class TV2IE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?tv2\.no/v/(?P<id>\d+)'
+    _VALID_URL = r'https?://(?:www\.)?tv2\.no/v\d*/(?P<id>\d+)'
     _TESTS = [{
         'url': 'http://www.tv2.no/v/916509/',
         'info_dict': {
@@ -33,6 +33,9 @@ class TV2IE(InfoExtractor):
             'view_count': int,
             'categories': list,
         },
+    }, {
+        'url': 'http://www.tv2.no/v2/916509',
+        'only_matching': True,
     }]
     _PROTOCOLS = ('HLS', 'DASH')
     _GEO_COUNTRIES = ['NO']