-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Recaptcha not load properly when hijack #672
Comments
If you want to transparently handle requests, you should code like this: router.MustAdd("*", func(ctx *rod.Hijack) {
ctx.ContinueRequest(&proto.FetchContinueRequest{})
}) |
Also check #395 |
How can I get the response of it ? I have try Thank you. |
The cdp protocol is not designed to use hijacking every request, you have to filter specific URLs. You can do either this: router.MustAdd("*index.js", func(ctx *rod.Hijack) {
ctx.MustLoadResponse()
fmt.Println(ctx.Response.Body())
}) or this: router.MustAdd("*", func(ctx *rod.Hijack) {
if strings.HasSuffix(ctx.Request.URL().String(), "index.js") {
ctx.MustLoadResponse()
fmt.Println(ctx.Response.Body())
} else {
ctx.ContinueRequest(&proto.FetchContinueRequest{})
}
}) |
Rod Version: v0.108.1
What you got
The recaptcha got error
What you expected to see
The recaptcha can normally solve
The text was updated successfully, but these errors were encountered: