custom notes for API
This commit is contained in:
parent
abc6cf0710
commit
0841071d67
@ -22,12 +22,12 @@ class ContarBaseIE(InfoExtractor):
|
|||||||
raise ExtractorError(
|
raise ExtractorError(
|
||||||
'%s said: %s' % (self.IE_NAME, error), expected=True)
|
'%s said: %s' % (self.IE_NAME, error), expected=True)
|
||||||
|
|
||||||
def _call_api(self, path, video_id, headers = {}):
|
def _call_api(self, path, video_id, headers = {}, note='Downloading JSON metadata'):
|
||||||
if self._auth_token:
|
if self._auth_token:
|
||||||
headers['Authorization'] = 'Bearer ' + self._auth_token
|
headers['Authorization'] = 'Bearer ' + self._auth_token
|
||||||
|
|
||||||
result = self._download_json(
|
result = self._download_json(
|
||||||
self._API_BASE + path, video_id, headers=headers)
|
self._API_BASE + path, video_id, headers=headers, note=note)
|
||||||
|
|
||||||
self._handle_errors(result)
|
self._handle_errors(result)
|
||||||
return result['data']
|
return result['data']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user