Comments (6)
Also, if you are Italian and want to write in Italian, that works too :)
from godet.
I don't think you can. Chrome requires a tab to use the remote debugging APIs.
What you can do is start by creating an empty tab (with URL "about:blank") and then load your pages in it when you need to (via remote.Navigate). No need to stop Chrome or close the tabs.
As an alternative, if you only need the HTML, why do you want use Chrome vs. simple using Go net/http client ?
from godet.
Thanks for answering that fast!
My problem is that I'm trying to scrape a very trick website (LinkedIn/Sales/) which redirects simples GET requests to blank page even when using cookies in the request. I thought then to use godet or chomedp to open a chrome instance with which I could login in my account and then use the info from that logged page for scrapping. If I open new tabs using godet after the login page it works perfectly, but opening new tabs just for grabbing HTML is a lot of machine work and I have to open a huge amount of tabs.
Do you have any suggestions for my problem? I'm kind newbie at Golang and programming...
from godet.
Again, if manually you are accessing those pages in the same tab, do the same in your automated app. No need to open new tabs, unless the website requires it.
The other thing you can do is what you suggest, use godet to open a page in chrome and login, then get all the info you need (cookies, headers, whatever) and do the remaining requests via net/http client.
from godet.
I'm actually Brazilian, maybe my English is affected because of my mother language Portuguese haha
Would it be too much to ask you for some help with this thing I suggested (get all the info you need (cookies, headers, whatever))? As I said I'm new at programming and I'm trying to learn by my self so the chrome debugging protocol, http requests and all this stuff still very kind of a pain. I'm not even sure what info would I need for this task. Any help you could give (considering that this package you've done is a lot already) would be great!
from godet.
All I would like to know, if you could help, is how to get those info using godet and after that how to actually make the requests with this. I can't picture how complicated it can became, but if I have at least a kick start about how to do all of that I could keep studying to improve my code and fix possible erros. Thanks again Raff!
from godet.
Related Issues (20)
- How to handle multiple alert? HOT 4
- remote.CallbackEvent can not work on remote.NewTab HOT 3
- leaking goroutines HOT 1
- Error when connecting to local host HOT 4
- Emulate geolocation HOT 5
- how to make chrome load all resources of the page? HOT 9
- GetResponseBody bug HOT 1
- Can't run basic example - dependency issue HOT 1
- dependency issue httpclient reporting error HOT 1
- Have the `Connect` interface receive a map of headers HOT 1
- Open multiple profiles on multiple tabs HOT 2
- Custom proxy for every tab.
- Sending selenium commands HOT 1
- Control in a separate window HOT 1
- remote.FullfillRequest not working HOT 2
- Interface Conversion Error upon calling remote.SetCookie HOT 2
- Page event seem be not triggered HOT 2
- how to set "download_restrictions" by godet? HOT 1
- remote.FulfillRequest problem HOT 6
- Is this hub give the method to generate a HAR file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godet.