[nrktv] Relax _VALID_URL
authorSergey M․ <dstftw@gmail.com>
Fri, 4 Dec 2020 19:46:28 +0000 (02:46 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 4 Dec 2020 19:46:28 +0000 (02:46 +0700)
youtube_dl/extractor/nrk.py

index 4a82b11fde04f3c3d6a61341510ace1abcb8c299..08e33189366746d968034507a0c787010a30d43c 100644 (file)
@@ -148,14 +148,7 @@ class NRKIE(NRKBaseIE):
 class NRKTVIE(NRKBaseIE):
     IE_DESC = 'NRK TV and NRK Radio'
     _EPISODE_RE = r'(?P<id>[a-zA-Z]{4}\d{8})'
-    _VALID_URL = r'''(?x)
-                        https?://
-                            (?:tv|radio)\.nrk(?:super)?\.no/
-                            (?:serie(?:/[^/]+){1,}|program)/
-                            (?![Ee]pisodes)%s
-                            (?:/\d{2}-\d{2}-\d{4})?
-                            (?:\#del=(?P<part_id>\d+))?
-                    ''' % _EPISODE_RE
+    _VALID_URL = r'https?://(?:tv|radio)\.nrk(?:super)?\.no/(?:[^/]+/)*%s' % _EPISODE_RE
     _API_HOSTS = ('psapi-ne.nrk.no', 'psapi-we.nrk.no')
     _TESTS = [{
         'url': 'https://tv.nrk.no/program/MDDP12000117',