-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
How to dump the dom just like chromium --dump-dom #897
Labels
question
Questions related to rod
Comments
|
GetResource expects an URL, however I want to pass a html string or use |
Use func runHTMLinHeadless(html string) {
page := rod.New().MustConnect().MustPage("about:blank")
page.MustSetDocumentContent(html).MustWaitStable()
fmt.Println(page.MustHTML())
} |
Thanks this works flawlessly! |
9viz
pushed a commit
to 9viz/pratilipi2epub
that referenced
this issue
Jan 4, 2024
* go.mod: Update rod. * pratilipi2epub.go (getContent): Prefer MustWaitStable over MustWaitLoad to let JS do its thing. See go-rod/rod#897.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rod Version: v0.113.3
I want to dump the DOM, after javascript is being executed. Similar to
/usr/bin/chromium --headless --no-sandbox --dump-dom URL
. However using page.MustHTML() is returning the source code without javascript being executed and I'm not able to find another function which does that.The text was updated successfully, but these errors were encountered: