aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.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/common.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/common.py')
-rw-r--r--yt_dlp/extractor/common.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index f3ae3fd4c..d0e57da23 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -49,6 +49,7 @@ from ..utils import (
error_to_compat_str,
extract_attributes,
ExtractorError,
+ filter_dict,
fix_xml_ampersands,
float_or_none,
format_field,
@@ -248,14 +249,14 @@ class InfoExtractor(object):
license: License name the video is licensed under.
creator: The creator of the video.
timestamp: UNIX timestamp of the moment the video was uploaded
- upload_date: Video upload date (YYYYMMDD).
+ upload_date: Video upload date in UTC (YYYYMMDD).
If not explicitly set, calculated from timestamp
release_timestamp: UNIX timestamp of the moment the video was released.
If it is not clear whether to use timestamp or this, use the former
- release_date: The date (YYYYMMDD) when the video was released.
+ release_date: The date (YYYYMMDD) when the video was released in UTC.
If not explicitly set, calculated from release_timestamp
modified_timestamp: UNIX timestamp of the moment the video was last modified.
- modified_date: The date (YYYYMMDD) when the video was last modified.
+ modified_date: The date (YYYYMMDD) when the video was last modified in UTC.
If not explicitly set, calculated from modified_timestamp
uploader_id: Nickname or id of the video uploader.
uploader_url: Full URL to a personal webpage of the video uploader.
@@ -469,6 +470,7 @@ class InfoExtractor(object):
_GEO_IP_BLOCKS = None
_WORKING = True
_NETRC_MACHINE = None
+ IE_DESC = None
_LOGIN_HINTS = {
'any': 'Use --cookies, --cookies-from-browser, --username and --password, or --netrc to provide account credentials',
@@ -1033,7 +1035,7 @@ class InfoExtractor(object):
if transform_source:
json_string = transform_source(json_string)
try:
- return json.loads(json_string)
+ return json.loads(json_string, strict=False)
except ValueError as ve:
errmsg = '%s: Failed to parse JSON ' % video_id
if fatal:
@@ -1587,7 +1589,7 @@ class InfoExtractor(object):
break
traverse_json_ld(json_ld)
- return dict((k, v) for k, v in info.items() if v is not None)
+ return filter_dict(info)
def _search_nextjs_data(self, webpage, video_id, *, transform_source=None, fatal=True, **kw):
return self._parse_json(