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

去除 cloudscraper 后改用 httpx ,似乎并没有触发 cf #17

Closed
NekoAria opened this issue Mar 15, 2022 · 11 comments
Closed

去除 cloudscraper 后改用 httpx ,似乎并没有触发 cf #17

NekoAria opened this issue Mar 15, 2022 · 11 comments

Comments

@NekoAria
Copy link
Collaborator

因为我只在我的机器和服务器上测试过,所以不太确定。
于是创建了一个新的分支:https://github.com/NekoAria/PicImageSearch/tree/httpx-only
@Coder-Sakura @Ansbot @kitUIN
请各位帮忙测试一下。

@NekoAria
Copy link
Collaborator Author

并且我之前用的是异步的 ascii2d ,那个请求就是用 httpx 封装的,而 #13 里提到的应该是同步的 ascii2d

@kitUIN
Copy link
Owner

kitUIN commented Mar 15, 2022

居然报了302
image

@NekoAria
Copy link
Collaborator Author

居然报了302 image

可是异步的我没动啊。。。动的是同步的

@kitUIN
Copy link
Owner

kitUIN commented Mar 15, 2022

居然报了302 image

可是异步的我没动啊。。。动的是同步的

看来是我的问题....

@kitUIN
Copy link
Owner

kitUIN commented Mar 15, 2022

image
我服务器端不行

@NekoAria
Copy link
Collaborator Author

image 我服务器端不行

那异步的也不行吗?如果是的话,异步的也得改为用 cloudscraper

@NekoAria
Copy link
Collaborator Author

NekoAria commented Mar 15, 2022

不过从 Tsuk1ko/cq-picsearcher-bot#283 最后的回复来看,只需要指定TLS版本就行。

看了 httpx 默认是走 TLS 1.3 的。

@kitUIN
Copy link
Owner

kitUIN commented Mar 15, 2022

image
重开环境测试后两者皆无问题

@kitUIN
Copy link
Owner

kitUIN commented Mar 15, 2022

image
多次请求时同步时不时出错.
异步暂时无问题

@NekoAria
Copy link
Collaborator Author

image 多次请求时同步时不时出错. 异步暂时无问题

实际上我测试过换成 httpx 之前的代码,同步的也是时不时出错,而且不仅是 ascii2d ,其他的也有这情况,最明显的是 iqdb

@NekoAria
Copy link
Collaborator Author

目前已经合并进主分支,如果遇到问题到时候再开新 issue

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

2 participants