mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
fix length check
This commit is contained in:
parent
36be10805d
commit
f412a9e9c5
@ -8,7 +8,7 @@ def tudou_download_by_iid(iid, title, output_dir = '.', merge = True, info_only
|
||||
data = json.loads(get_decoded_html('http://www.tudou.com/outplay/goto/getItemSegs.action?iid=%s' % iid))
|
||||
vids = []
|
||||
for k in data:
|
||||
if len(data[k]) == 1:
|
||||
if len(data[k]) > 0:
|
||||
vids.append({"k": data[k][0]["k"], "size": data[k][0]["size"]})
|
||||
|
||||
temp = max(vids, key=lambda x:x["size"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user