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

page.Navigate(url), the page is like blocked #1047

Closed
UchihaArk opened this issue Apr 26, 2024 · 1 comment
Closed

page.Navigate(url), the page is like blocked #1047

UchihaArk opened this issue Apr 26, 2024 · 1 comment
Labels
question Questions related to rod

Comments

@UchihaArk
Copy link

UchihaArk commented Apr 26, 2024

Rod Version: v0.115.0

The code to demonstrate my question

browser := rod.New().
 	ControlURL(launcher.New().
 		Headless(true).
 		NoSandbox(true).
 		MustLaunch()).
 	MustConnect().
 	MustIncognito().
 	MustIgnoreCertErrors(true)
 defer browser.MustClose()

 page := stealth.MustPage(browser)

 page.MustNavigate("https://baijiahao.baidu.com/s?id=1796948662162767360&wfr=spider&for=pc")
 page.HTML()

What you got

The page is like blocked

What you expect to see

The page can be control

@UchihaArk UchihaArk added the question Questions related to rod label Apr 26, 2024
@ysmood
Copy link
Collaborator

ysmood commented May 5, 2024

Works fine to me:

package main

import (
	"fmt"

	"github.com/go-rod/rod"
)

func main() {
	browser := rod.New().MustConnect()
	page := browser.MustPage("https://baijiahao.baidu.com/s?id=1796948662162767360&wfr=spider&for=pc").MustWaitStable()
	fmt.Println(page.MustHTML())
}

@ysmood ysmood closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants