Merge branch 'print-audiolang-in-json-output' of https://github.com/coslyk/you-get into coslyk-print-audiolang-in-json-output

This commit is contained in:
Mort Yao 2017-03-05 11:11:10 +01:00
commit 6c87cbde10
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -11,6 +11,11 @@ def output(video_extractor, pretty_print=True):
out['title'] = ve.title
out['site'] = ve.name
out['streams'] = ve.streams
try:
if ve.audiolang:
out['audiolang'] = ve.audiolang
except NameError:
pass
if pretty_print:
print(json.dumps(out, indent=4, sort_keys=True, ensure_ascii=False))
else: