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))
|
||||
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])
|
||||
urls = [[n.firstChild.nodeValue.strip()
|
||||
for n in
|
||||
parseString(
|
||||
get_html('http://ct.v2.tudou.com/f?id=%s' % vid))
|
||||
.getElementsByTagName('f')][0]
|
||||
for vid in vids]
|
||||
|
||||
urls = []
|
||||
for vid in vids:
|
||||
for i in parseString(get_html('http://ct.v2.tudou.com/f?id=%s' % vid)).getElementsByTagName('f'):
|
||||
urls.append(i.firstChild.nodeValue.strip())
|
||||
|
||||
ext = r1(r'http://[\w.]*/(\w+)/[\w.]*', urls[0])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user