mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
avoid AttributeError in json_output.py
This commit is contained in:
parent
4891ae1783
commit
e614cda733
@ -17,9 +17,9 @@ def output(video_extractor, pretty_print=True):
|
||||
except AttributeError:
|
||||
pass
|
||||
extra = {}
|
||||
if ve.referer is not None:
|
||||
if getattr(ve, 'referer', None) is not None:
|
||||
extra["referer"] = ve.referer
|
||||
if ve.ua is not None:
|
||||
if getattr(ve, 'ua', None) is not None:
|
||||
extra["ua"] = ve.ua
|
||||
if extra:
|
||||
out["extra"] = extra
|
||||
|
Loading…
Reference in New Issue
Block a user