1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-04 00:55:15 +00:00

[extractor/youtube:tab] Let approximate_date return timestamp

This commit is contained in:
pukkandan
2022-10-13 04:23:39 +05:30
parent 94dc8604dd
commit 5225df50cf
3 changed files with 10 additions and 10 deletions

View File

@ -3843,8 +3843,8 @@ class InfoExtractor:
@param default The default value to return when the key is not present (default: [])
@param casesense When false, the values are converted to lower case
'''
val = traverse_obj(
self._downloader.params, ('extractor_args', (ie_key or self.ie_key()).lower(), key))
ie_key = ie_key if isinstance(ie_key, str) else (ie_key or self).ie_key()
val = traverse_obj(self._downloader.params, ('extractor_args', ie_key.lower(), key))
if val is None:
return [] if default is NO_DEFAULT else default
return list(val) if casesense else [x.lower() for x in val]