mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
[tudou] fix #925
This commit is contained in:
parent
ef8cc3dba1
commit
aabf30641b
@ -9,12 +9,11 @@ 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))
|
data = json.loads(get_decoded_html('http://www.tudou.com/outplay/goto/getItemSegs.action?iid=%s' % iid))
|
||||||
temp = max([data[i] for i in data if 'size' in data[i][0]], key=lambda x:sum([part['size'] for part in x]))
|
temp = max([data[i] for i in data if 'size' in data[i][0]], key=lambda x:sum([part['size'] for part in x]))
|
||||||
vids, size = [t["k"] for t in temp], sum([t["size"] for t in temp])
|
vids, size = [t["k"] for t in temp], sum([t["size"] for t in temp])
|
||||||
urls = [[n.firstChild.nodeValue.strip()
|
|
||||||
for n in
|
urls = []
|
||||||
parseString(
|
for vid in vids:
|
||||||
get_html('http://ct.v2.tudou.com/f?id=%s' % vid))
|
for i in parseString(get_html('http://ct.v2.tudou.com/f?id=%s' % vid)).getElementsByTagName('f'):
|
||||||
.getElementsByTagName('f')][0]
|
urls.append(i.firstChild.nodeValue.strip())
|
||||||
for vid in vids]
|
|
||||||
|
|
||||||
ext = r1(r'http://[\w.]*/(\w+)/[\w.]*', urls[0])
|
ext = r1(r'http://[\w.]*/(\w+)/[\w.]*', urls[0])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user