Code Monkey home page Code Monkey logo

pan-baidu-download's People

Contributors

ezioruan avatar haobug avatar jiefoxi avatar liruqi avatar pz325 avatar sdvcrx avatar superwg avatar thisiscam avatar ttimasdf avatar yamada95 avatar zhuyifei1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pan-baidu-download's Issues

文件上传

为什么不来个文件上传功能?没有看到开发计划里列出呢。

话说好久没见过更新了呢。

Program just stuck...

There is no progress when running the show/download command. I have to ctrl-c to terminate it.

$ pan show http://pan.baidu.com/s/1ntDRD1Z
^CTraceback (most recent call last):
File "/usr/local/bin/pan", line 53, in
execute_command()
File "/usr/local/bin/pan", line 49, in execute_command
commandscommand
File "/data/projects/pan-baidu-download/command/show.py", line 15, in show
info = pan.get_dlink(url)
File "/data/projects/pan-baidu-download/bddown_core.py", line 109, in get_dlink
response = self._request('POST', url, extra_params=extra_params, post_data=post_form)
File "/data/projects/pan-baidu-download/bddown_core.py", line 185, in _request
response = self.session.post(base_url, data=post_data, params=params, headers=self.headers, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 504, in post
return self.request('POST', url, data=data, json=json, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 447, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 375, in prepare_request
params=merge_setting(request.params, self.params),
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 62, in merge_setting
merged_setting = dict_class(to_key_val_list(session_setting))
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/packages/ordered_dict.py", line 37, in init
self.__root
KeyboardInterrupt

TypeError: init() takes exactly 1 argument (2 given)

When I run it, I got this error:

$ pan show http://pan.baidu.com/s/xxxxxxx
Traceback (most recent call last):
File "/usr/local/bin/pan", line 53, in
execute_command()
File "/usr/local/bin/pan", line 49, in execute_command
commandscommand
File "/data/projects/pan-baidu-download/command/show.py", line 14, in show
pan = Pan(url)
TypeError: init() takes exactly 1 argument (2 given)

请问为何获取不到bduss?

你好,debug的时候看到获取的bduss为空,后面调取list的时候就始终返回错误errno:-6 ,请问是什么情况?谢谢~

Download erroring

Hi, please find the output I get when trying to download a file.
Not sure why I get this "authorization failed" message.

Thanks!

python bddown_cli.py download https://pan.baidu.com/s/1mjfSJLu
Please input this sharing password
lj07
Saved verification code to  /Users/clement/Documents/pan-baidu-download
Please input the captcha:
23AU
Saved verification code to  /Users/clement/Documents/pan-baidu-download
Please input the captcha:
MAV6
SCUT-FBP5500.rar
aria2c -c -d "" -o "SCUT-FBP5500.rar" -s10 -x10 --user-agent="netdisk;5.2.6;PC;PC-Windows;6.2.9200;WindowsBaiduYunGuanJia" --header "Referer:http://pan.baidu.com/disk/home"    "http://d.pcs.baidu.com/file/747e86bc9d6eb0732c4ccbc48455aad4?fid=2265545530-250528-380757416150922&time=1517446189&rt=sh&sign=FDTAERV-DCb740ccc5511e5e8fedcff06b081203-1a4dfGcLWaqCAi94rPYvmVrZTLk%3D&expires=8h&chkv=1&chkbd=0&chkpc=&dp-logid=727510986809062426&dp-callid=0&r=709641727"

01/31 16:49:49 [NOTICE] Downloading 1 item(s)

01/31 16:49:50 [NOTICE] CUID#7 - Redirecting to http://d7.baidupcs.com/file/747e86bc9d6eb0732c4ccbc48455aad4?bkt=p3-0000e889fbaf5ebf5e5ba46245148d71d197&xcode=f5df707201ba75ab6e42bed4259c5169a43d59d45bc3a0e32e905b3767d006213a33b46dea161e24963a771c85177fa19717ec4418c70769&fid=2265545530-250528-380757416150922&time=1517446189&sign=FDTAXGERLQBHSKa-DCb740ccc5511e5e8fedcff06b081203-zrce3z1dNFy8r2QjD3WBT8EnY%2BE%3D&to=d7&size=174989589&sta_dx=174989589&sta_cs=71&sta_ft=rar&sta_ct=3&sta_mt=3&fm2=MH%2CYangquan%2CAnywhere%2C%2Ccalifornia%2Cany&vuk=282335&iv=0&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=0000e889fbaf5ebf5e5ba46245148d71d197&sl=83034191&expires=8h&rt=sh&r=709641727&mlogid=727510986809062426&vbdid=-&fin=SCUT-FBP5500.rar&rtype=1&dp-logid=727510986809062426&dp-callid=0.1.1&tsl=300&csl=300&csign=jxOBRm%2B9AOkpJPmKw2etyaLT0P0%3D&so=1&ut=6&uter=-1&serv=0&uc=2684902746&ic=2676319999&ti=7feef675d20449a07bd44e91c768a074b6e4131f7382f943&by=themis
[#2a60da 0B/0B CN:1 DL:0B]                                                                                            
01/31 16:49:51 [NOTICE] CUID#7 - Redirecting to http://220.165.142.153/d7.baidupcs.com/file/747e86bc9d6eb0732c4ccbc48455aad4?bkt=p3-0000e889fbaf5ebf5e5ba46245148d71d197&xcode=f5df707201ba75ab6e42bed4259c5169a43d59d45bc3a0e32e905b3767d006213a33b46dea161e24963a771c85177fa19717ec4418c70769&fid=2265545530-250528-380757416150922&time=1517446189&sign=FDTAXGERLQBHSKa-DCb740ccc5511e5e8fedcff06b081203-zrce3z1dNFy8r2QjD3WBT8EnY%2BE%3D&to=d7&size=174989589&sta_dx=174989589&sta_cs=71&sta_ft=rar&sta_ct=3&sta_mt=3&fm2=MH%2CYangquan%2CAnywhere%2C%2Ccalifornia%2Cany&vuk=282335&iv=0&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=0000e889fbaf5ebf5e5ba46245148d71d197&sl=83034191&expires=8h&rt=sh&r=709641727&mlogid=727510986809062426&vbdid=-&fin=SCUT-FBP5500.rar&rtype=1&dp-logid=727510986809062426&dp-callid=0.1.1&tsl=300&csl=300&csign=jxOBRm%2B9AOkpJPmKw2etyaLT0P0%3D&so=1&ut=6&uter=-1&serv=0&uc=2684902746&ic=2676319999&ti=7feef675d20449a07bd44e91c768a074b6e4131f7382f943&by=themis&wshc_tag=0&wsts_tag=5a72642f&wsid_tag=c7c0571a&wsiphost=ipdbm
[#2a60da 0B/0B CN:1 DL:0B]                                                                                            
01/31 16:49:53 [ERROR] CUID#7 - Download aborted. URI=http://d.pcs.baidu.com/file/747e86bc9d6eb0732c4ccbc48455aad4?fid=2265545530-250528-380757416150922&time=1517446189&rt=sh&sign=FDTAERV-DCb740ccc5511e5e8fedcff06b081203-1a4dfGcLWaqCAi94rPYvmVrZTLk%3D&expires=8h&chkv=1&chkbd=0&chkpc=&dp-logid=727510986809062426&dp-callid=0&r=709641727
Exception: [AbstractCommand.cc:351] errorCode=24 URI=http://220.165.142.153/d7.baidupcs.com/file/747e86bc9d6eb0732c4ccbc48455aad4?bkt=p3-0000e889fbaf5ebf5e5ba46245148d71d197&xcode=f5df707201ba75ab6e42bed4259c5169a43d59d45bc3a0e32e905b3767d006213a33b46dea161e24963a771c85177fa19717ec4418c70769&fid=2265545530-250528-380757416150922&time=1517446189&sign=FDTAXGERLQBHSKa-DCb740ccc5511e5e8fedcff06b081203-zrce3z1dNFy8r2QjD3WBT8EnY%2BE%3D&to=d7&size=174989589&sta_dx=174989589&sta_cs=71&sta_ft=rar&sta_ct=3&sta_mt=3&fm2=MH%2CYangquan%2CAnywhere%2C%2Ccalifornia%2Cany&vuk=282335&iv=0&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=0000e889fbaf5ebf5e5ba46245148d71d197&sl=83034191&expires=8h&rt=sh&r=709641727&mlogid=727510986809062426&vbdid=-&fin=SCUT-FBP5500.rar&rtype=1&dp-logid=727510986809062426&dp-callid=0.1.1&tsl=300&csl=300&csign=jxOBRm%2B9AOkpJPmKw2etyaLT0P0%3D&so=1&ut=6&uter=-1&serv=0&uc=2684902746&ic=2676319999&ti=7feef675d20449a07bd44e91c768a074b6e4131f7382f943&by=themis&wshc_tag=0&wsts_tag=5a72642f&wsid_tag=c7c0571a&wsiphost=ipdbm
  -> [HttpSkipResponseCommand.cc:215] errorCode=24 Authorization failed.

01/31 16:49:53 [NOTICE] Download GID#2a60da5f51e39bb1 not complete: ./SCUT-FBP5500.rar

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
2a60da|ERR |       0B/s|./SCUT-FBP5500.rar

验证码出不来

~$ pan download http://pan.baidu.com/s/1f6kM3
请输入看到的验证码

就没然后了
imagemagick这个也装了

原来在文件夹里 @@
pan config save_vcode 1
改了之后能弹出新窗口 但是没验证码影子
下载忒慢 保存都是几乎满速

不支持 pan.baidu.com/wap/link?

bddown_cli.py download http://pan.baidu.com/wap/link?uk=4077175030&shareid=1340782516&third=0

出错。

在bddown_cli.py中execute_command上改为如下即可:
t = [i.replace('wap/link', 'share/link') for i in args] args = t

KeyError: 'dlink'

I was trying to download a shared folder.
The exact command I used is:
pan download --dir=~/Downloads http://pan.baidu.com/s/1sj0qV12
Then I got the following error report message

Traceback (most recent call last):
  File "bddown_cli.py", line 53, in <module>
    execute_command()
  File "bddown_cli.py", line 49, in execute_command
    commands[command](args[1:])
  File "/Users/qqy/workspace/pan-baidu-download/command/download.py", line 56, in download
    info = pan.get_dlink(url, secret)
  File "/Users/qqy/workspace/pan-baidu-download/bddown_core.py", line 125, in get_dlink
    dlink = _json['list'][0]['dlink']
KeyError: 'dlink'

Uploading?

Looked at your code, but seems uploading isn't supported.

Win8 Powershell下出现错误

PS C:\portable\pan-baidu-download> python bddown_cli.py download "http://pan.baidu.com/s/1bnAQy6b"
Saved verification code to C:\portable\pan-baidu-download
Please input the captcha:
B26W
←[32mFedora-Live-Workstation-x86_64-21-5.iso←[0m
Exception caught
Exception: [download_helper.cc:417] errorCode=1 Unrecognized URI or unsupported protocol: BDUSS='

密码设置还有登录什么的都一切正常
试过aria2的以下版本
aria2-1.18.10-win-64bit-build1
aria2-1.18.10-win-32bit-build1
aria2-1.18.8-win-64bit-build1

can't our script get rid of the speed limitation any more?

it looks the baidu pan officially changed the limitation
mechanism that they begin to limit the speed from server side.

The speed limitation of the official client and our script are
almost the same after I compared.

It this true?

SyntaxError: unexpected EOF while parsing

Finally I've logined, but

pan download https://pan.baidu.com/s/1jRv99Zx1FjV3OKC-JlZEzg
Please input this sharing password
1y8t
Traceback (most recent call last):
  File "/usr/bin/pan", line 10, in <module>
    execute_command()
  File "/d/PortableApps/pan-baidu-download/bddown_cli.py", line 49, in execute_command
    commands[command](args[1:])
  File "/d/PortableApps/pan-baidu-download/command/download.py", line 102, in download
    fis = pan.get_file_infos(url, secret)
  File "/d/PortableApps/pan-baidu-download/bddown_core.py", line 205, in get_file_infos
    js = self._get_js(link, secret)
  File "/d/PortableApps/pan-baidu-download/bddown_core.py", line 144, in _get_js
    self.verify_passwd(req.url, secret)
  File "/d/PortableApps/pan-baidu-download/bddown_core.py", line 258, in verify_passwd
    pwd = input("Please input this sharing password\n")
  File "<string>", line 1
    1y8t
       ^
SyntaxError: unexpected EOF while parsing

Windows 上 UTF-8 的支持有问题

因为命令提示符默认代码页为GBK,中文会显示乱码
所以,chcp 65001将活动代码页转换为UTF-8
下载会出错

python bddown_cli.py download http://pan.baidu.com/s/1c2iM8AO
Please input this sharing password
bpb4
Traceback (most recent call last):
  File "bddown_cli.py", line 53, in <module>
    execute_command()
  File "bddown_cli.py", line 49, in execute_command
    commands[command](args[1:])
  File "D:\PortableApps\pan-baidu-download\command\download.py", line 110, in download
    download_command(fi.filename, savedir, fi.dlink, cookies=cookies, limit=limit, output_dir=output_dir)
  File "D:\PortableApps\pan-baidu-download\command\download.py", line 18, in download_command
    print("\033[32m" + filename + "\033[0m")
LookupError: unknown encoding: cp65001

bddown_core.UnknownError

Still got error with show/download commands:

$ pan show http://pan.baidu.com/s/1ntDRD1Z
DEBUG - GET - javascript:
-> {u'CATEGORY': u'"1"', u'MYUK': u'"1612105621"', u'SHARE_ID': u'"3357278666"', u'SHAREPAGETYPE': u'"single_file_page"', u'SHARE_UK': u'"1612105621"', u'TIMESTAMP': u'"1418145888"', u'MYBDSTOKEN': u'"26b255ed9aa121979b24fd0023584fbd"', u'MYNAME': u'"leonardoxiao"', u'SHARE_USER_NAME': u'"leonardoxiao"', u'SIGN': u'"5fb37a1d16bb862d6b2dca803c485e9a88b3d052"', u'PATH_MD5': u'"17002055282084106347"', u'LOGINSTATUS': u'"1"', u'FS_ID': u'"58627452856343"', u'CTIME': u'"1418145874"', u'ISVIP': u'"0"', u'SHARE_TIME': u'"1418145874"'}

DEBUG - POST - json:
-> {u'errno': 113, u'server_time': 1418145888, u'request_id': 9109425969587958514L}

Traceback (most recent call last):
File "/usr/local/bin/pan", line 53, in
execute_command()
File "/usr/local/bin/pan", line 49, in execute_command
commandscommand
File "/data/projects/pan-baidu-download/command/show.py", line 15, in show
info = pan.get_dlink(url)
File "/data/projects/pan-baidu-download/bddown_core.py", line 124, in get_dlink
raise UnknownError
bddown_core.UnknownError

$ pan download http://pan.baidu.com/s/1ntDRD1Z
DEBUG - GET - javascript:
-> {u'CATEGORY': u'"1"', u'MYUK': u'"1612105621"', u'SHARE_ID': u'"3357278666"', u'SHAREPAGETYPE': u'"single_file_page"', u'SHARE_UK': u'"1612105621"', u'TIMESTAMP': u'"1418145908"', u'MYBDSTOKEN': u'"26b255ed9aa121979b24fd0023584fbd"', u'MYNAME': u'"leonardoxiao"', u'SHARE_USER_NAME': u'"leonardoxiao"', u'SIGN': u'"7015bf0d6f0ddfde5a15944f976240e84340a78b"', u'PATH_MD5': u'"17002055282084106347"', u'LOGINSTATUS': u'"1"', u'FS_ID': u'"58627452856343"', u'CTIME': u'"1418145874"', u'ISVIP': u'"0"', u'SHARE_TIME': u'"1418145874"'}

DEBUG - POST - json:
-> {u'errno': 113, u'server_time': 1418145908, u'request_id': 9109431257799329977L}

Traceback (most recent call last):
File "/usr/local/bin/pan", line 53, in
execute_command()
File "/usr/local/bin/pan", line 49, in execute_command
commandscommand
File "/data/projects/pan-baidu-download/command/download.py", line 54, in download
info = pan.get_dlink(url, secret)
File "/data/projects/pan-baidu-download/bddown_core.py", line 124, in get_dlink
raise UnknownError
bddown_core.UnknownError

Baidu Netdisk doesn't download

Hi. Yesterday everything worked correctly, but today, I don't know why, the files stopped adding to Baidu Netdisk and started downloading via google chrome. Does anybody know how can I fix this? I don't want tu use the google chrome downloader because it is too slow and I can't resume the download once it has stopped.

Thanks in advance.

请输入看到的验证码,该从哪里看呢?

我输入提取码直接挂了,验证码是从那里看到呢?
请输入看到的验证码
gqk9

Traceback (most recent call last):
File "./bddown_cli.py", line 45, in
execute_command()
File "./bddown_cli.py", line 41, in execute_command
commandscommand
File "/home//temp/pan-baidu-download/bddown_core.py", line 113, in download
queue = generate_download_queue(links)
File "/home/
/temp/pan-baidu-download/bddown_core.py", line 91, in generate_download_queue
download_queue.extend(zip(bd.filename, bd.links))
File "/home/_/temp/pan-baidu-download/bddown_core.py", line 72, in links
raise VerificationCodeError
bddown_core.VerificationCodeError: 验证码错误或异常

IndexError: list index out of range

pan download https://pan.baidu.com/s/1jRv99Zx1FjV3OKC-JlZEzg
Please input this sharing password
1y8t
Traceback (most recent call last):
  File "D:\PortableApps\pan-baidu-download\bddown_cli.py", line 53, in <module>
    execute_command()
  File "D:\PortableApps\pan-baidu-download\bddown_cli.py", line 49, in execute_command
    commands[command](args[1:])
  File "D:\PortableApps\pan-baidu-download\command\download.py", line 102, in download
    fis = pan.get_file_infos(url, secret)
  File "D:\PortableApps\pan-baidu-download\bddown_core.py", line 228, in get_file_infos
    return [self.get_file_info(shareinfo, fsid=f['fs_id'], secret=secret) for f in self.all_files]
  File "D:\PortableApps\pan-baidu-download\bddown_core.py", line 182, in get_file_info
    fi.filename = _json['list'][0]['server_filename']
IndexError: list index out of range

乱码导致出错,下不了

Windows10,gbk编码
下载这个文件 http://pan.baidu.com/s/1nuSi02H ,直接报错:

[AbstractDiskWriter.cc:206] errNum=123 errorCode=16 Failed to open the file ./椋庝簯涓夊浗2.8鏈€鏂扮増10娴嬶紙7鏈?
鍙峰埗浣滄棤BUG鐗堬級.rar, cause: The filename, directory name, or volume label syntax is incorrect.

原因应该是乱码以后正好包含了windows不允许的字符,导致写不进文件。

macOS中文验证码不可用

现在登录验证码是中文的,pan login已经没法用了,但不登陆,批量下载时候验证码又恶心的不要不要的。

临时解决方法:

  1. 在控制台里复制为curl
  2. https://curl.trillworks.com/ 把它转成requests格式,复制cookies
  3. 用下面一段代码写入cookies
import pickle
with open('/Users/wtf/.baidu.cookies', 'w') as f:
    pickle.dump(cookies, f)

啥时候能增加个类似的功能呐

Unable to login

I tried different accounts and captchas but the problem still persists.

python bddown_cli.py login
Saved verification code to /home/KLOCS/pan-baidu-download
Please input the captcha:
EHWU
Traceback (most recent call last):
File "bddown_cli.py", line 53, in
execute_command()
File "bddown_cli.py", line 49, in execute_command
commandscommand
File "/home/KLOCS/pan-baidu-download/command/login.py", line 171, in login
account.login()
File "/home/KLOCS/pan-baidu-download/command/login.py", line 129, in login
raise LoginError('登陆异常')
command.login.LoginError: 登陆异常

请问为何有的账号不行?

你好,我有一个账号试了几个星期都登陆不上,网页登陆是ok的,怎么都找不到问题。今天换了一个账号就好了。。。。请问有可能是什么问题呢?原先的账号页面登陆什么的都是正常的。

error

Please input this sharing password
jjbb
Traceback (most recent call last):
File "bddown_cli.py", line 53, in
execute_command()
File "bddown_cli.py", line 49, in execute_command
commandscommand
File "/pan-baidu-download/command/download.py", line 111, in download
if not hasExtension(fi.filename, extension):
File "/pan-baidu-download/command/download.py", line 69, in hasExtension
return file_ext.lower()[1:] == extension.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

please help!!!!!!

AttributeError with links with password

Thanks for the great script, but there's an error when downloading from pages asking for a password.

For example:

python bddown_cli.py show http://pan.baidu.com/s/1kTrCcMr --dir=~/Downloads
Please input this sharing password
xpef
Traceback (most recent call last):
File "bddown_cli.py", line 53, in
execute_command()
File "bddown_cli.py", line 49, in execute_command
commandscommand
File "/media/hdd/edev/sandbox/pan-baidu-download/command/show.py", line 15, in show
info = pan.get_dlink(url)
File "/media/hdd/edev/sandbox/pan-baidu-download/bddown_core.py", line 97, in get_dlink
js = self._get_js(link, secret)
File "/media/hdd/edev/sandbox/pan-baidu-download/bddown_core.py", line 88, in _get_js
self.verify_passwd(req.url, secret)
File "/media/hdd/edev/sandbox/pan-baidu-download/bddown_core.py", line 153, in verify_passwd
errno = mesg.get('errno')
AttributeError: 'function' object has no attribute 'get'

The password for this link is xpef

最近无法下载,提示“IndexError: list index out of range”

详细错误提示如下:

Traceback (most recent call last):
  File "bddown_cli.py", line 53, in <module>
    execute_command()
  File "bddown_cli.py", line 49, in execute_command
    commands[command](args[1:])
  File ".../pan-baidu-download/command/download.py", line 56, in download
    info = pan.get_dlink(url, secret)
  File ".../pan-baidu-download/bddown_core.py", line 102, in get_dlink
    js = self._get_js(link, secret)
  File ".../pan-baidu-download/bddown_core.py", line 98, in _get_js
    return js[0] or None
IndexError: list index out of range

2015-10-17前还好用,从2015-10-19开始就提示这个错误。
简单看了一下错误内容,是由于_get_js()函数中的req.text内容为404error,里面的中文都是乱码,看不出来是啥错误。不知道是我这面的个例还是baidu那面做了啥屏蔽?

运行环境:

  • Python 2.7.6
  • Ubuntu 14.04
  • 使用了http代理

可否加一个功能打印出下载文件和进度的状态信息?

主要场景是这样的:

一个云盘分享连接里面有多个目录和多个文件,文件的层级比较深,不方便一个个点开去看。目前下载这样一个链接时,aria2 只会显示当前正在下载文件的信息,但我想知道的信息是总共有多少个文件需要下载,哪些已下载,哪些未下载,最好还可以知道未下载文件的大小

所以希望能实现功能是在每下载完一个文件后显示上述信息,以便知道总体下载进度。

Win8下依然无法工作

这次是单引号的错么? C:/Portable/pan-baidu-download/'Fedora-Live-Workstation-x86_64-21-5.iso'

PS C:\Portable\pan-baidu-download> python bddown_cli.py download http://pan.baidu.com/s/1bnAQy6b
Saved verification code to C:\Portable\pan-baidu-download
Please input the captcha:
oT3z
Saved verification code to C:\Portable\pan-baidu-download
Please input the captcha:
RRB9
←[32mFedora-Live-Workstation-x86_64-21-5.iso←[0m

02/23 21:15:38 [NOTICE] Download GID#920c77ede1410b0d not complete: C:/Portable/pan-baidu-download/'Fedora-Live-Workstat
ion-x86_64-21-5.iso'

Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
920c77|ERR | n/a|C:/Portable/pan-baidu-download/'Fedora-Live-Workstation-x86_64-21-5.iso'

Status Legend:
(ERR):error occurred.

aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.
The system cannot accept the time entered.
Enter the new time:
'rt' is not recognized as an internal or external command,
operable program or batch file.
'sign' is not recognized as an internal or external command,
operable program or batch file.
'expires' is not recognized as an internal or external command,
operable program or batch file.
'prisign' is not recognized as an internal or external command,
operable program or batch file.
'chkv' is not recognized as an internal or external command,
operable program or batch file.
'chkbd' is not recognized as an internal or external command,
operable program or batch file.
'chkpc' is not recognized as an internal or external command,
operable program or batch file.
'r' is not recognized as an internal or external command,
operable program or batch file.

嗯...其实我开个虚拟机也能用...

下载时报错

Hi, 我在 Ubuntu 14.04 运行 python bddown_cli.py download ”url“ 时报错,如下:

Traceback (most recent call last):
File "bddown_cli.py", line 53, in
execute_command()
File "bddown_cli.py", line 49, in execute_command
commandscommand
File "/root/baidu/command/download.py", line 56, in download
info = pan.get_dlink(url, secret)
File "/root/baidu/bddown_core.py", line 102, in get_dlink
js = self._get_js(link, secret)
File "/root/baidu/bddown_core.py", line 91, in _get_js
req = self.session.get(link)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 477, in get
return self.request('GET', url, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, *_send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(110, 'Connection timed out'))

Can't download files from Baidu anymore

Hi. For some reason previously valid links now can't be downloaded with your tool. Example:

$ pan download http://pan.baidu.com/s/1eQxxdCI --secret 6hsh
Traceback (most recent call last):
  File "/home/kagami/.local/bin/pan", line 53, in <module>
    execute_command()
  File "/home/kagami/.local/bin/pan", line 49, in execute_command
    commands[command](args[1:])
  File "/home/kagami/code/tmp/pan-baidu-download/command/download.py", line 56, in download
    info = pan.get_dlink(url, secret)
  File "/home/kagami/code/tmp/pan-baidu-download/bddown_core.py", line 125, in get_dlink
    js = self._get_js(link, secret)
  File "/home/kagami/code/tmp/pan-baidu-download/bddown_core.py", line 116, in _get_js
    return js[0] or None
IndexError: list index out of range

Seems like Baidu has changed API?

Can't get the token

image
这个项目还在维护吗?
我登陆的时候提示Can't get the token,请教一下怎么解决?谢谢了

show 命令报错

Traceback (most recent call last):
  File "bddown_cli.py", line 53, in <module>
    execute_command()
  File "bddown_cli.py", line 49, in execute_command
    commands[command](args[1:])
  File "/Users/wong2/codes/python/pan-baidu-download/command/show.py", line 15, in show
    info = pan.get_dlink(url)
AttributeError: 'Pan' object has no attribute 'get_dlink'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.