mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-31 22:55:18 +00:00
[cleanup] Add more ruff rules (#10149)
Authored by: seproDev Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com> Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
@@ -29,7 +29,7 @@ class MediasetIE(ThePlatformBaseIE):
|
||||
'''
|
||||
|
||||
_EMBED_REGEX = [
|
||||
rf'<iframe[^>]+src=[\'"](?P<url>(?:https?:)?//(?:\w+\.)+mediaset\.it/player/(?:v\d+/)?index\.html\?\S*?programGuid={_GUID_RE})[\'"&]'
|
||||
rf'<iframe[^>]+src=[\'"](?P<url>(?:https?:)?//(?:\w+\.)+mediaset\.it/player/(?:v\d+/)?index\.html\?\S*?programGuid={_GUID_RE})[\'"&]',
|
||||
]
|
||||
_TESTS = [{
|
||||
# full episode
|
||||
@@ -154,14 +154,14 @@ class MediasetIE(ThePlatformBaseIE):
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True,
|
||||
}
|
||||
},
|
||||
}]
|
||||
|
||||
def _parse_smil_formats_and_subtitles(
|
||||
self, smil, smil_url, video_id, namespace=None, f4m_params=None, transform_rtmp_url=None):
|
||||
for video in smil.findall(self._xpath_ns('.//video', namespace)):
|
||||
video.attrib['src'] = re.sub(r'(https?://vod05)t(-mediaset-it\.akamaized\.net/.+?.mpd)\?.+', r'\1\2', video.attrib['src'])
|
||||
return super(MediasetIE, self)._parse_smil_formats_and_subtitles(
|
||||
return super()._parse_smil_formats_and_subtitles(
|
||||
smil, smil_url, video_id, namespace, f4m_params, transform_rtmp_url)
|
||||
|
||||
def _check_drm_formats(self, tp_formats, video_id):
|
||||
|
||||
Reference in New Issue
Block a user