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

Is it possible to make a request through chrome's network stack ? #909

Open
greg-lancet opened this issue Jul 24, 2023 · 2 comments
Open
Labels
question Questions related to rod

Comments

@greg-lancet
Copy link

Rod Version: v0.114.1

Something like this:

browser := rod.New().ControlURL(launchUri.MustLaunch()).MustConnect()
page := browser.MustPage("<url>").MustWaitLoad()
var req *http.Request
page.Request(req) // launches the request through the page

It would useful for web scrappers who uses both a chrome driver & reverse engineered requests.
Maybe you can already do it somehow ? Thanks.

@greg-lancet greg-lancet added the question Questions related to rod label Jul 24, 2023
@github-actions
Copy link

Please fix the format of your markdown:

4 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```golang"]
9 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]

generated by check-issue

@ysmood
Copy link
Member

ysmood commented Jul 24, 2023

Check the tutorial: https://go-rod.github.io/#/javascript-runtime

https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch

page.MustEval(`u => fetch(u)`, "https://test.com")

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