mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 03:03:01 +00:00
[heise] Don't check string type
Before Python 3 could be unicode, so don't check at all.
This commit is contained in:
parent
0155549d6c
commit
7b7518124e
1 changed files with 3 additions and 4 deletions
|
@ -88,8 +88,7 @@ def _real_extract(self, url):
|
||||||
for res, obj in rs.items():
|
for res, obj in rs.items():
|
||||||
format_id = '{0}_{1}'.format(t, res)
|
format_id = '{0}_{1}'.format(t, res)
|
||||||
|
|
||||||
if (not obj or not obj.get('url') or
|
if not obj or not obj.get('url'):
|
||||||
not isinstance(obj['url'], str)):
|
|
||||||
self._warn('formats: {0}: no url', format_id)
|
self._warn('formats: {0}: no url', format_id)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -107,11 +106,11 @@ def _real_extract(self, url):
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
info['formats'] = formats
|
info['formats'] = formats
|
||||||
|
|
||||||
if config.get('poster') and isinstance(config['poster'], str):
|
if config.get('poster'):
|
||||||
info['thumbnail'] = config['poster']
|
info['thumbnail'] = config['poster']
|
||||||
|
|
||||||
date = get_meta_content('date', html)
|
date = get_meta_content('date', html)
|
||||||
if date and isinstance(date, str):
|
if date:
|
||||||
try:
|
try:
|
||||||
info['timestamp'] = parse_iso8601(date)
|
info['timestamp'] = parse_iso8601(date)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
|
|
Loading…
Reference in a new issue