Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login problem #6

Open
kz0 opened this issue Jun 19, 2016 · 12 comments
Open

Login problem #6

kz0 opened this issue Jun 19, 2016 · 12 comments

Comments

@kz0
Copy link

kz0 commented Jun 19, 2016

When i try to log in i get stuck on a captcha loop. I'm always asked to input a captcha when the code is always correct.

Can you point me to a debug to see what is the problem?

@ly0
Copy link
Owner

ly0 commented Jun 20, 2016

Check if baidupcsapi is the latest version.

@kz0
Copy link
Author

kz0 commented Jun 27, 2016

Using baidupcsapi version 0.2.12

I can now login but the cookies are deleted after i ls the directory or perform any other action such as move or copy.

@ly0
Copy link
Owner

ly0 commented Jun 27, 2016

.cookies file will only be saved in your current work directory.

@kz0
Copy link
Author

kz0 commented Aug 5, 2016

Running in debug i get this error:

Fri, 05 Aug 2016 13:49:00 api.py[line:132] DEBUG setting pcs server Fri, 05 Aug 2016 13:49:00 connectionpool.py[line:214] INFO Starting new HTTP connection (1): pcs.baidu.com Fri, 05 Aug 2016 13:49:02 connectionpool.py[line:401] DEBUG "GET /rest/2.0/pcs/file?app_id=250528&method=locateupload HTTP/1.1" 200 None Fri, 05 Aug 2016 13:49:02 api.py[line:201] DEBUG cookies file:.pinypon@qq.com.cookies Fri, 05 Aug 2016 13:49:02 api.py[line:204] DEBUG p****@qq.com cookies file has already existed. Fri, 05 Aug 2016 13:49:02 api.py[line:208] DEBUG <RequestsCookieJar[]> Fri, 05 Aug 2016 13:49:02 connectionpool.py[line:805] INFO Starting new HTTPS connection (1): passport.baidu.com Fri, 05 Aug 2016 13:49:03 connectionpool.py[line:401] DEBUG "GET /v2/api/?getapi&tpl=mn&apiver=v3&class=login&tt=1470401342&logintype=dialogLogin&callback=0 HTTP/1.1" 200 365 Fri, 05 Aug 2016 13:49:03 api.py[line:220] INFO token 设置pcs服务器 Fri, 05 Aug 2016 13:49:03 connectionpool.py[line:214] INFO Starting new HTTP connection (1): pcs.baidu.com Fri, 05 Aug 2016 13:49:04 connectionpool.py[line:401] DEBUG "GET /rest/2.0/pcs/file?app_id=250528&method=locateupload HTTP/1.1" 200 None pcs api server: c.pcs.baidu.com / 未命中 Fri, 05 Aug 2016 13:49:19 connectionpool.py[line:214] INFO Starting new HTTP connection (1): pan.baidu.com Fri, 05 Aug 2016 13:49:20 connectionpool.py[line:401] DEBUG "POST /api/filemetas?blocks=0&dlink=1&BDUSS=kFGT1ZuM20zSlNsUVVIRX5ocG5Mb2M5QVBLVjBJaGUwVWoxUjdXV0J0blM4OHBYQVFBQUFBJCQAAAAAAAAAAAEAAAANREJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANJmo1fSZqNXS&t=1470401359&bdstoken=dcfafc3e239a1c20dc45cc6d52d07524&method=filemetas&app_id=250528 HTTP/1.1" 200 45 Fri, 05 Aug 2016 13:49:20 api.py[line:104] DEBUG Offline, deleting cookies file then relogin. Fri, 05 Aug 2016 13:49:20 api.py[line:201] DEBUG cookies file:.p****@qq.com.cookies Fri, 05 Aug 2016 13:49:20 connectionpool.py[line:214] INFO Starting new HTTP connection (1): www.baidu.com Fri, 05 Aug 2016 13:49:21 connectionpool.py[line:401] DEBUG "GET / HTTP/1.1" 200 None Fri, 05 Aug 2016 13:49:22 connectionpool.py[line:401] DEBUG "GET /v2/api/?getapi&tpl=mn&apiver=v3&class=login&tt=1470401361&logintype=dialogLogin&callback=0 HTTP/1.1" 200 365 Fri, 05 Aug 2016 13:49:22 api.py[line:220] INFO token dcfafc3e239a1c20dc45cc6d52d07524 Fri, 05 Aug 2016 13:49:22 connectionpool.py[line:401] DEBUG "GET /v2/getpublickey?token=dcfafc3e239a1c20dc45cc6d52d07524 HTTP/1.1" 200 356 Fri, 05 Aug 2016 13:49:23 connectionpool.py[line:401] DEBUG "POST /v2/api/?login HTTP/1.1" 200 None Fri, 05 Aug 2016 13:49:23 api.py[line:283] DEBUG need captcha, codeString=njG4206e2ea67c3e20702a61413de013f14b053de069301139a https://passport.baidu.com/cgi-bin/genimage?njG4206e2ea67c3e20702a61413de013f14b053de069301139a open url aboved with your web browser, then input verify code > 1418 Fri, 05 Aug 2016 13:49:56 connectionpool.py[line:249] INFO Resetting dropped connection: passport.baidu.com Fri, 05 Aug 2016 13:49:57 connectionpool.py[line:401] DEBUG "POST /v2/api/?login HTTP/1.1" 200 None /TV Series 未命中 Fri, 05 Aug 2016 13:49:57 connectionpool.py[line:249] INFO Resetting dropped connection: pan.baidu.com Fri, 05 Aug 2016 13:49:57 connectionpool.py[line:401] DEBUG "POST /api/filemetas?blocks=0&dlink=1&BDUSS=kFGT1ZuM20zSlNsUVVIRX5ocG5Mb2M5QVBLVjBJaGUwVWoxUjdXV0J0blM4OHBYQVFBQUFBJCQAAAAAAAAAAAEAAAANREJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANJmo1fSZqNXS&t=1470401397&bdstoken=dcfafc3e239a1c20dc45cc6d52d07524&method=filemetas&app_id=250528 HTTP/1.1" 200 45 Fri, 05 Aug 2016 13:49:57 api.py[line:104] DEBUG Offline, deleting cookies file then relogin. Fri, 05 Aug 2016 13:49:57 api.py[line:201] DEBUG cookies file:.p******@qq.com.cookies Fri, 05 Aug 2016 13:49:58 connectionpool.py[line:401] DEBUG "GET / HTTP/1.1" 200 None Fri, 05 Aug 2016 13:49:58 connectionpool.py[line:401] DEBUG "GET /v2/api/?getapi&tpl=mn&apiver=v3&class=login&tt=1470401398&logintype=dialogLogin&callback=0 HTTP/1.1" 200 365 Fri, 05 Aug 2016 13:49:58 api.py[line:220] INFO token dcfafc3e239a1c20dc45cc6d52d07524 Fri, 05 Aug 2016 13:49:59 connectionpool.py[line:401] DEBUG "GET /v2/getpublickey?token=dcfafc3e239a1c20dc45cc6d52d07524 HTTP/1.1" 200 355 Fri, 05 Aug 2016 13:49:59 connectionpool.py[line:401] DEBUG "POST /v2/api/?login HTTP/1.1" 200 None Fri, 05 Aug 2016 13:49:59 api.py[line:283] DEBUG need captcha, codeString=njG0006c1ea6746f5a502ad14de0c01485ab21a5b0731018ac8 https://passport.baidu.com/cgi-bin/genimage?njG0006c1ea6746f5a502ad14de0c01485ab21a5b0731018ac8 open url aboved with your web browser, then input verify code > / 未命中 Fri, 05 Aug 2016 13:50:33 connectionpool.py[line:249] INFO Resetting dropped connection: pan.baidu.com Fri, 05 Aug 2016 13:50:34 connectionpool.py[line:401] DEBUG "POST /api/filemetas?blocks=0&dlink=1&BDUSS=kFGT1ZuM20zSlNsUVVIRX5ocG5Mb2M5QVBLVjBJaGUwVWoxUjdXV0J0blM4OHBYQVFBQUFBJCQAAAAAAAAAAAEAAAANREJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANJmo1fSZqNXS&t=1470401433&bdstoken=dcfafc3e239a1c20dc45cc6d52d07524&method=filemetas&app_id=250528 HTTP/1.1" 200 45 Fri, 05 Aug 2016 13:50:34 api.py[line:104] DEBUG Offline, deleting cookies file then relogin. Fri, 05 Aug 2016 13:50:34 api.py[line:201] DEBUG cookies file:.p******@qq.com.cookies Fri, 05 Aug 2016 13:50:34 connectionpool.py[line:401] DEBUG "GET / HTTP/1.1" 200 None Fri, 05 Aug 2016 13:50:34 connectionpool.py[line:249] INFO Resetting dropped connection: passport.baidu.com Fri, 05 Aug 2016 13:50:36 connectionpool.py[line:401] DEBUG "GET /v2/api/?getapi&tpl=mn&apiver=v3&class=login&tt=1470401434&logintype=dialogLogin&callback=0 HTTP/1.1" 200 365 Fri, 05 Aug 2016 13:50:36 api.py[line:220] INFO token dcfafc3e239a1c20dc45cc6d52d07524 Fri, 05 Aug 2016 13:50:36 connectionpool.py[line:401] DEBUG "GET /v2/getpublickey?token=dcfafc3e239a1c20dc45cc6d52d07524 HTTP/1.1" 200 357 Fri, 05 Aug 2016 13:50:36 connectionpool.py[line:401] DEBUG "POST /v2/api/?login HTTP/1.1" 200 None Fri, 05 Aug 2016 13:50:36 api.py[line:283] DEBUG need captcha, codeString=njG1607c1ea67f6c1be0220149f3b015051b5c53b0779023702

I keep inputing the captcha and the connection resets again.

@hannsen
Copy link

hannsen commented Aug 25, 2016

having the same problem.

baidupcsapi (0.3.8)
fusepy (2.0.4)

maybe one could manually generate a .cookie?

@hannsen
Copy link

hannsen commented Aug 25, 2016

anybody got a sample .cookie? (with censored ID of course)

@kz0
Copy link
Author

kz0 commented Aug 25, 2016

Here it is. Please report if you have any success.

(dp0 S'HOSUPPORT' p1 S'' p2 sS'PTOKEN' p3 S'' p4 sS'BDUSS' p5 S'' p6 sS'USERNAMETYPE' p7 S'' p8 sS'SAVEUSERID' p9 S'' p10 sS'BAIDUID' p11 S'' p12 sS'H_PS_PSSID' p13 S'' p14 sS'BIDUPSID' p15 S'' p16 sS'PANPSC' p17 S'' p18 sS'BDSVRTM' p19 S'' p20 sS'BD_HOME' p21 g20 sS'STOKEN' p22 S'' p23 sS'UBI' p24 S'' p25 sS'PSTM' p26 S'' p27 sS'HISTORY' p28 S'' p29

@hannsen
Copy link

hannsen commented Aug 26, 2016

i doubt i can figure that one out

@tleydxdy
Copy link

tleydxdy commented Aug 8, 2017

same here unknown err_id=400037
baidupcsapi (0.3.8)

@tleydxdy
Copy link

tleydxdy commented Aug 8, 2017

Is there any manual method to get the cookie?

@ly0
Copy link
Owner

ly0 commented Aug 11, 2017

@tleydxdy using chrome devtools

@tleydxdy
Copy link

tleydxdy commented Aug 11, 2017

manually creating .cookie seems successful. (caching very slowly, update when caching finished)

update: working but there are billions of captchas and I can't delete files (not on Baidu's website either)

Repository owner deleted a comment Jan 31, 2024
Repository owner deleted a comment from mkproject-admin Feb 21, 2024
Repository owner deleted a comment from saggii-tech Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants