mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[youku] print error message
This commit is contained in:
parent
c0b856a160
commit
7fd4fac40f
@ -115,9 +115,13 @@ class Youku(VideoExtractor):
|
||||
try:
|
||||
meta = json.loads(get_html(api_url))
|
||||
data = meta['data']
|
||||
assert 'stream' in data
|
||||
except:
|
||||
log.wtf('[Failed] Video not found.')
|
||||
# TBD: error code? password protected?
|
||||
if 'error' in data:
|
||||
log.wtf('[Failed] ' + data['error']['note'])
|
||||
else:
|
||||
log.wtf('[Failed] Video not found.')
|
||||
# TBD: password protected?
|
||||
|
||||
self.title = data['video']['title']
|
||||
self.ep = data['security']['encrypt_string']
|
||||
|
Loading…
Reference in New Issue
Block a user