aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/svt.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-12-01 23:33:30 +0800
committerJesús <heckyel@hyperbola.info>2022-12-01 23:33:30 +0800
commitef1a420d6de7876b7b6732abc8ab78351c5a2bfc (patch)
tree9ba7d8409aa5baa696f5fb10db5d395c2f050276 /yt_dlp/extractor/svt.py
parent16e8548f6a720a78679e417a20a300db2036bf6c (diff)
parentddf1e22d48530819d60220d0bdc36e20f5b8483b (diff)
downloadhypervideo-pre-ef1a420d6de7876b7b6732abc8ab78351c5a2bfc.tar.lz
hypervideo-pre-ef1a420d6de7876b7b6732abc8ab78351c5a2bfc.tar.xz
hypervideo-pre-ef1a420d6de7876b7b6732abc8ab78351c5a2bfc.zip
update from upstream 2022-12-01 UTC+8
Diffstat (limited to 'yt_dlp/extractor/svt.py')
-rw-r--r--yt_dlp/extractor/svt.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/yt_dlp/extractor/svt.py b/yt_dlp/extractor/svt.py
index e0c436b67..31bf7f97e 100644
--- a/yt_dlp/extractor/svt.py
+++ b/yt_dlp/extractor/svt.py
@@ -51,7 +51,6 @@ class SVTBaseIE(InfoExtractor):
self.raise_geo_restricted(
'This video is only available in Sweden',
countries=self._GEO_COUNTRIES, metadata_available=True)
- self._sort_formats(formats)
subtitle_references = dict_get(video_info, ('subtitles', 'subtitleReferences'))
if isinstance(subtitle_references, list):
@@ -101,6 +100,7 @@ class SVTBaseIE(InfoExtractor):
class SVTIE(SVTBaseIE):
_VALID_URL = r'https?://(?:www\.)?svt\.se/wd\?(?:.*?&)?widgetId=(?P<widget_id>\d+)&.*?\barticleId=(?P<id>\d+)'
+ _EMBED_REGEX = [r'(?:<iframe src|href)="(?P<url>%s[^"]*)"' % _VALID_URL]
_TEST = {
'url': 'http://www.svt.se/wd?widgetId=23991&sectionId=541&articleId=2900353&type=embed&contextSectionId=123&autostart=false',
'md5': '33e9a5d8f646523ce0868ecfb0eed77d',
@@ -113,13 +113,6 @@ class SVTIE(SVTBaseIE):
},
}
- @staticmethod
- def _extract_url(webpage):
- mobj = re.search(
- r'(?:<iframe src|href)="(?P<url>%s[^"]*)"' % SVTIE._VALID_URL, webpage)
- if mobj:
- return mobj.group('url')
-
def _real_extract(self, url):
mobj = self._match_valid_url(url)
widget_id = mobj.group('widget_id')