-
Notifications
You must be signed in to change notification settings - Fork 150
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
HTTP 403 #140
Comments
Demo still works normally. Can you provide more information? Such as network environment etc. Reference:
|
I have the same 403 problem, no proxy or bypass used. The HTML response looks like CloudFare's captcha challenge page. Maybe we need to bypass the challenge of CF by setting User-Agent and other methods. |
There is no problem using pixivpy in Japan. It may be that pixiv has applied a new region restriction to the API. Needs further testing @upbit 日本IP登录正常,但是其他国家IP貌似会弹验证 |
On my side, both US (directly) and JP (proxied) IP failed. |
从现象看这个猜测最有可能,login接口可能被强制走CF验证了... 这招好狠 |
I access from Japan, but I get 403 error. |
无法在本地复现403问题,功能完全正常,返回值就是正常的json;登陆后其他操作也没有问题 另外说到客户端,重新测试了一下
Android客户端解包v5.0.219以后也有了类似的验证方式,另外貌似删除了oauth.secure.pixiv.net接口(没有找到相关内容) /* compiled from: PixivOAuthLoginService.kt */
public static final class C6770c<T, R> implements C5711g<T, R> {
...
public final /* synthetic */ Object apply(Object obj) {
C6787a aVar = (C6787a) obj;
C9228j.m23839b(aVar, "it");
return this.f22320a.f22316b.f23930b + "/web/v1/login?code_challenge=" + aVar.f22357a + "&code_challenge_method=S256&client=pixiv-android";
}
} 作为参考,原本的请求参数部分和PixivOAuthResponse好像都做了修改 /* new v5.0.219 */
C6042s<R> c = a.f22285a.mo25627a(bVar.f26842a, bVar2.f22358a, authorizationCode.f22354a, "authorization_code", bVar.f26843b, "MOBrBDS8blbauoSck0ZfDbtuzpyT", "lsACyCD94FhDUtGTXi3QzcFE2uU1hqtDaKeqrdwj", true).mo24530c(new C6746a.C6749c(a));
C6042s<C7130e> mo25627a(@C9694y String str, @C9672c(mo29288a = "code_verifier") String str2, @C9672c(mo29288a = "code") String str3, @C9672c(mo29288a = "grant_type") String str4, @C9672c(mo29288a = "redirect_uri") String str5, @C9672c(mo29288a = "client_id") String str6, @C9672c(mo29288a = "client_secret") String str7, @C9672c(mo29288a = "include_policy") boolean z);
/* old v5.0.156 */
PixivOAuthResponse b = C4402h.m13992a().mo21264b("MOBrBDS8blbauoSck0ZfDbtuzpyT", "lsACyCD94FhDUtGTXi3QzcFE2uU1hqtDaKeqrdwj", "password", str2, password, C3841g.m12695a(), true, true);
PixivOAuthResponse mo21264b(@C6444c(mo24824a = "client_id") String str, @C6444c(mo24824a = "client_secret") String str2, @C6444c(mo24824a = "grant_type") String str3, @C6444c(mo24824a = "username") String str4, @C6444c(mo24824a = "password") String str5, @C6444c(mo24824a = "device_token") String str6, @C6444c(mo24824a = "get_secure_url") boolean z, @C6444c(mo24824a = "include_policy") boolean z2); 有可能更换了登陆API或者修改了实现方式?(才疏学浅,看得比较粗略 |
不过如果加了这个,API去绕过recaptcha就比较困难了。可能得想其他验证的方案,或者搞个换 |
Changing this line: Line 29 in bcceffc
to self.requests = cloudscraper.create_scraper() from the cloudscraper module seems to "fix" it for me fwiw |
It fixed for me for a second, and it is not working for me now. |
The cloudscraper thing still works for me 🤷, but the underlying issue seems to be the user-agent string because changing this line Line 83 in bcceffc
to 'User-Agent': 'foo', (i.e. just any random string) consistently fixes it as well for me. |
Good job! I will test whether this method is stable as soon as possible. |
I tried the original code, and I did not trigger 403 (in Guangdong Telecom environment and Hong Kong proxy server). I just pushed a test version, can anyone who met 403 help verify whether it works?
因为无法触发限制,有同学可以帮忙验证下这个改动是否稳定吗?可以用 |
The test version has resolved the 403 problem on my side. |
I Pulled Master changes to local, it fixes the error 403. |
@remiliacn Can this version fix your problem? |
I fixed it by using |
This method may not be a real fix, just bypass CloudFare and connect to Pixiv directly. |
Release 3.5.10, please upgrade: |
Thank you, it works! |
isn't the question how and why pixiv or cf displays the message? |
Recently started to occur with the .login() function
After that, All this
html thing
The account credentials are correct.
The account has not been banned, i tried with a new one, it doesn't work either
I hope this is not a silly mistake on my part
The text was updated successfully, but these errors were encountered: