mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
[tvw] Get rid of brackets while accessing dicts
This commit is contained in:
parent
9ce3313bbe
commit
e4c60ade83
1 changed files with 3 additions and 3 deletions
|
@ -100,9 +100,9 @@ def _real_extract(self, url):
|
|||
except ExtractorError as e:
|
||||
if isinstance(e.cause, HTTPError):
|
||||
self.write_debug(e.cause)
|
||||
response = self._parse_json(e.cause.response.read().decode(), video_id)['errors']
|
||||
if response['hasError'] is True:
|
||||
raise ExtractorError('{} said: {}'.format(self.IE_NAME, response['error']), expected=True)
|
||||
response = self._parse_json(e.cause.response.read().decode(), video_id).get('errors')
|
||||
if response.get('hasError') is True:
|
||||
raise ExtractorError('{} said: {}'.format(self.IE_NAME, response.get('error')), expected=True)
|
||||
raise
|
||||
|
||||
stream_url = traverse_obj(response, ('streamingURIs', 'main'))
|
||||
|
|
Loading…
Reference in a new issue