you-get无法在便携版Python上使用? #138

Closed
nuomi1 opened this Issue Mar 30, 2013 · 3 comments

Projects

None yet

2 participants

@nuomi1
nuomi1 commented Mar 30, 2013

使用命令
"Python33\App\python.exe" "you-get-master\you-get" URL

错误信息
Traceback (most recent call last):
File "E:\PortableApps\you-get-master\you-get", line 9, in
main()
File "E:\PortableApps\you-get-master\src\you_get__main__.py", line 74, in main
script_main('you-get', any_download, any_download_playlist)
File "E:\PortableApps\you-get-master\src\you_get\common.py", line 678, in script_main
download_main(download, download_playlist, args, playlist, output_dir, merge, info_only)
File "E:\PortableApps\you-get-master\src\you_get\common.py", line 598, in download_main
download(url, output_dir = output_dir, merge = merge, info_only = info_only)

File "E:\PortableApps\you-get-master\src\you_get__main__.py", line 67, in any_download
m.download(url, output_dir = output_dir, merge = merge, info_only = info_only)
File "E:\PortableApps\you-get-master\src\you_get\downloader\tudou.py", line 46, in tudou_download
tudou_download_by_iid(iid, title, output_dir = output_dir, merge = merge, info_only = info_only)
File "E:\PortableApps\you-get-master\src\you_get\downloader\tudou.py", line 11, in tudou_download_by_iid
doc = parseString(xml)
File "E:\PortableApps\CommonFiles\Python33\App\lib\xml\dom\minidom.py", line 1949, in parseString
return expatbuilder.parseString(string)
File "E:\PortableApps\CommonFiles\Python33\App\lib\xml\dom\expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "E:\PortableApps\CommonFiles\Python33\App\lib\xml\dom\expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0

便携版Python
http://portablepython.com/wiki/PortablePython3.2.1.1

@soimort
Owner
soimort commented Mar 30, 2013

请给出下载的视频地址。

@soimort
Owner
soimort commented Mar 30, 2013

与PortablePython无关,3.2.1版本的Python本身是一个有regression bug的版本,它的urllib不能正常访问某些地址。你可以自己试试:

from urllib import request

url = "http://v2.tudou.com/v?it=165669498&st=1,2,3,4,99"
response = request.urlopen(url)
data = response.read()
print(">>", data)

在3.2.1上返回一个空串。其他版本的Python都能正常返回数据。

参见 http://mail.python.org/pipermail/python-dev/2011-August/112719.html

@soimort soimort closed this Mar 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment