sdvcrx / pan-baidu-download

百度网盘下载脚本
MIT License
435 stars 103 forks source link

IndexError: list index out of range #55

Closed mengmo closed 6 years ago

mengmo commented 6 years ago
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
pz325 commented 6 years ago

It seems 'http://pan.baidu.com/api/sharedownload' responses list:[]. Maybe due to to a change of baidu pan's API?

sdvcrx commented 6 years ago

Sorry for the delay.

Please pull the latest code and login first before downloading , now download api requires login token.

https://github.com/sdvcrx/pan-baidu-download#quick-start

mengmo commented 6 years ago

@sdvcrx I try to login, but encountered this Command Prompt

pan login
Saved verification code to D:\PortableApps\pan-baidu-download
Please input the captcha:
尽有
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\login.py", line 171, in login
    account.login()
  File "D:\PortableApps\pan-baidu-download\command\login.py", line 129, in login
    raise LoginError('鐧婚檰寮傚父')
command.login.LoginError: 鐧婚檰寮傚父

Msys2

pan login
Saved verification code to /d/PortableApps/pan-baidu-download
Please input the captcha:
征稿
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/login.py", line 171, in login
    account.login()
  File "/d/PortableApps/pan-baidu-download/command/login.py", line 129, in login
    raise LoginError('登陆异常')
command.login.LoginError: 登陆异常