]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/svt.py
[extractor] Common function `_match_valid_url`
[yt-dlp.git] / yt_dlp / extractor / svt.py
index 4b6284a8d77df8d0b0f49a20370331cb8402c5ee..38e0086b327ec7a69b2c779a34e3f2df47043065 100644 (file)
@@ -119,7 +119,7 @@ def _extract_url(webpage):
             return mobj.group('url')
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
+        mobj = self._match_valid_url(url)
         widget_id = mobj.group('widget_id')
         article_id = mobj.group('id')
 
@@ -225,7 +225,7 @@ def _extract_by_video_id(self, video_id, webpage=None):
         return info_dict
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
+        mobj = self._match_valid_url(url)
         video_id = mobj.group('id')
         svt_id = mobj.group('svt_id') or mobj.group('modal_id')
 
@@ -301,7 +301,7 @@ def suitable(cls, url):
         return False if SVTIE.suitable(url) or SVTPlayIE.suitable(url) else super(SVTSeriesIE, cls).suitable(url)
 
     def _real_extract(self, url):
-        series_slug, season_id = re.match(self._VALID_URL, url).groups()
+        series_slug, season_id = self._match_valid_url(url).groups()
 
         series = self._download_json(
             'https://api.svt.se/contento/graphql', series_slug,
@@ -400,7 +400,7 @@ def suitable(cls, url):
         return False if SVTIE.suitable(url) or SVTPlayIE.suitable(url) else super(SVTPageIE, cls).suitable(url)
 
     def _real_extract(self, url):
-        path, display_id = re.match(self._VALID_URL, url).groups()
+        path, display_id = self._match_valid_url(url).groups()
 
         article = self._download_json(
             'https://api.svt.se/nss-api/page/' + path, display_id,