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

PixivBot中调用登录报错104 #149

Closed
monokuma233 opened this issue Nov 26, 2020 · 3 comments
Closed

PixivBot中调用登录报错104 #149

monokuma233 opened this issue Nov 26, 2020 · 3 comments

Comments

@monokuma233
Copy link

使用ssttkkl/PixivBot部署机器人,依赖3.5.10版本,登录一直报104错误:

Traceback (most recent call last):
File "/home/pixivbot/PixivBot-0.2.0/pixiv/pixiv_api.py", line 35, in watchman
await launch(auth)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/pixivbot/PixivBot-0.2.0/pixiv/pixiv_api.py", line 27, in auth
papi.login(settings["pixiv"]["username"], settings["pixiv"]["password"])
File "/home/pixivbot/.local/lib/python3.9/site-packages/pixivpy3/api.py", line 75, in login
return self.auth(username=username, password=password)
File "/home/pixivbot/.local/lib/python3.9/site-packages/pixivpy3/api.py", line 111, in auth
r = self.requests_call('POST', url, headers=headers, data=data)
File "/home/pixivbot/.local/lib/python3.9/site-packages/pixivpy3/api.py", line 66, in requests_call
raise PixivError('requests %s %s error: %s' % (method, url, e))
pixivpy3.utils.PixivError: requests POST https://app-api.pixiv.net.cdn.cloudflare.net./auth/token error: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

求解决,感谢!

@upbit
Copy link
Owner

upbit commented Nov 26, 2020

requests POST https://app-api.pixiv.net.cdn.cloudflare.net./auth/token error

解析到cloudflare域名了,参考 #138 的那个问题。可以先排除下OpenSSL的版本问题,如果不是可以按 #138 (comment) 的方法试试更换Host

dup of #138, #148

@monokuma233
Copy link
Author

requests POST https://app-api.pixiv.net.cdn.cloudflare.net./auth/token error

解析到cloudflare域名了,参考 #138 的那个问题。可以先排除下OpenSSL的版本问题,如果不是可以按 #138 (comment) 的方法试试更换Host

dup of #138, #148

已解决,十分感谢!

@monokuma233
Copy link
Author

papi = ByPassSniApi(proxies=proxies)
papi.require_appapi_hosts(hostname="public-api.secure.pixiv.net")
改成这样就OK了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants