mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
[flickr] handle error message
This commit is contained in:
parent
146672254e
commit
f3003531a5
@ -3,6 +3,7 @@
|
||||
from .common import InfoExtractor
|
||||
from ..compat import compat_urllib_parse
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
int_or_none,
|
||||
qualities,
|
||||
)
|
||||
@ -39,7 +40,10 @@ def _call_api(self, method, video_id, api_key, note, secret=None):
|
||||
}
|
||||
if secret:
|
||||
query['secret'] = secret
|
||||
return self._download_json(self._API_BASE_URL + compat_urllib_parse.urlencode(query), video_id, note)
|
||||
data = self._download_json(self._API_BASE_URL + compat_urllib_parse.urlencode(query), video_id, note)
|
||||
if data['stat'] != 'ok':
|
||||
raise ExtractorError(data['message'])
|
||||
return data
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
|
Loading…
Reference in New Issue
Block a user