1
0
mirror of https://github.com/l1ving/youtube-dl synced 2026-05-27 23:49:49 +08:00

custom notes for API

This commit is contained in:
Pablo Castorino
2019-01-31 14:46:21 -03:00
Unverified
parent abc6cf0710
commit 0841071d67
+2 -2
View File
@@ -22,12 +22,12 @@ class ContarBaseIE(InfoExtractor):
raise ExtractorError(
'%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:
headers['Authorization'] = 'Bearer ' + self._auth_token
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)
return result['data']