sdvcrx / pan-baidu-download

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

SyntaxError: unexpected EOF while parsing #56

Closed mengmo closed 6 years ago

mengmo commented 6 years ago

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

another error

pan download https://pan.baidu.com/s/1FOYV1saWZjwd7NgeOgNrlw
Please input this sharing password
neko
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, in <module>
NameError: name 'neko' is not defined
sdvcrx commented 6 years ago

Pull and try again?

mengmo commented 6 years ago

@sdvcrx status=403

pan download https://pan.baidu.com/s/1jRv99Zx1FjV3OKC-JlZEzg
Please input this sharing password
1y8t
BusyBox_6.7.9.0.apk
aria2c -c -d "" -o "BusyBox_6.7.9.0.apk" -s10 -x10 --user-agent="netdisk;5.2.6;PC;PC-Windows;6.2.9200;WindowsBaiduYunGuanJia" --header "Referer:http://pan.baidu.com/disk/home" --header "Cookies: BDUSS="   "http://d.pcs.baidu.com/file/de700b35120d81d2effafa4274fad20e?fid=1903860798-250528-365660447349442&dstime=1540824560&rt=sh&sign=FDtAERV-DCb740ccc5511e5e8fedcff06b081203-4aspB8SCUrqeJoj%2FpkhGTxPibJo%3D&expires=8h&chkv=1&chkbd=0&chkpc=&dp-logid=7003094632647286900&dp-callid=0&shareid=2923632188&r=915443480"

10/29 22:49:18 [NOTICE] Downloading 1 item(s)

10/29 22:49:18 [ERROR] CUID#7 - Download aborted. URI=http://d.pcs.baidu.com/file/de700b35120d81d2effafa4274fad20e?fid=1903860798-250528-365660447349442&dstime=1540824560&rt=sh&sign=FDtAERV-DCb740ccc5511e5e8fedcff06b081203-4aspB8SCUrqeJoj%2FpkhGTxPibJo%3D&expires=8h&chkv=1&chkbd=0&chkpc=&dp-logid=7003094632647286900&dp-callid=0&shareid=2923632188&r=915443480
Exception: [AbstractCommand.cc:351] errorCode=22 URI=http://d.pcs.baidu.com/file/de700b35120d81d2effafa4274fad20e?fid=1903860798-250528-365660447349442&dstime=1540824560&rt=sh&sign=FDtAERV-DCb740ccc5511e5e8fedcff06b081203-4aspB8SCUrqeJoj%2FpkhGTxPibJo%3D&expires=8h&chkv=1&chkbd=0&chkpc=&dp-logid=7003094632647286900&dp-callid=0&shareid=2923632188&r=915443480
  -> [HttpSkipResponseCommand.cc:240] errorCode=22 The response status is not successful. status=403

10/29 22:49:18 [NOTICE] Download GID#794d53f099ccab6d not complete: ./BusyBox_6.7.9.0.apk

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
794d53|ERR |       0B/s|./BusyBox_6.7.9.0.apk

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.
sdvcrx commented 6 years ago

@mengmo Please pull and try again...

sdvcrx commented 6 years ago

And something wrong with your cookies, "Cookies: BDUSS=", check ~/.baidu.cookies file

mengmo commented 6 years ago

I deleted BDUSS myself

mengmo commented 6 years ago

OK! https://github.com/sdvcrx/pan-baidu-download/commit/5bd559b2178be63995a5cfc5066a5df41c789b16 works.