aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/rai.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-03-30 01:24:15 +0800
committerJesús <heckyel@hyperbola.info>2022-03-30 01:24:15 +0800
commit950cc067b8c41ac246deb4725177a372c95d8341 (patch)
tree66d5284ff86faec8c3000be1e7d0bd856b4c4dbe /yt_dlp/extractor/rai.py
parent7a74bc5d1e54299e51b73492e09c70da994f4b35 (diff)
parente7870111e83033e0ac728d5a2d565d1eb146c335 (diff)
downloadhypervideo-pre-950cc067b8c41ac246deb4725177a372c95d8341.tar.lz
hypervideo-pre-950cc067b8c41ac246deb4725177a372c95d8341.tar.xz
hypervideo-pre-950cc067b8c41ac246deb4725177a372c95d8341.zip
updated from upstream | 30/03/2022 at 01:24
Diffstat (limited to 'yt_dlp/extractor/rai.py')
-rw-r--r--yt_dlp/extractor/rai.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/extractor/rai.py b/yt_dlp/extractor/rai.py
index 34f127285..9d243b2be 100644
--- a/yt_dlp/extractor/rai.py
+++ b/yt_dlp/extractor/rai.py
@@ -11,6 +11,7 @@ from ..compat import (
from ..utils import (
determine_ext,
ExtractorError,
+ filter_dict,
find_xpath_attr,
fix_xml_ampersands,
GeoRestrictedError,
@@ -110,11 +111,11 @@ class RaiBaseIE(InfoExtractor):
if not audio_only:
formats.extend(self._create_http_urls(relinker_url, formats))
- return dict((k, v) for k, v in {
+ return filter_dict({
'is_live': is_live,
'duration': duration,
'formats': formats,
- }.items() if v is not None)
+ })
def _create_http_urls(self, relinker_url, fmts):
_RELINKER_REG = r'https?://(?P<host>[^/]+?)/(?:i/)?(?P<extra>[^/]+?)/(?P<path>.+?)/(?P<id>\d+)(?:_(?P<quality>[\d\,]+))?(?:\.mp4|/playlist\.m3u8).+?'