You already answer your question yourself. You say "by entering it and pressing Ctrl+U you will notice that there is only javascript that loads the products".
Golang by default has no Javascript engine and in a general context there is no point in having it. You are probably getting the contents of the page using the http
, it will only get the content of that page, ie the same HTML you are seeing in CTRL+U. If it contains any <img>
, <script>
(...) will be insignificant, Golang will not upload this content unless you use some library that does this (some "golang browser" or integrate it with some other webdriver...).
The most practical solution is to see where the content is obtained. If the element is dynamically created it comes from somewhere, then just find this source.
The most practical way is to go in the Console (F12 or CTRL + SHIFT + I) and then in "Network" and select "XHR", in this case you will see that there is a request for:
https://busca.saudifitness.com.br/externalapp/?busca=SeuTermoBuscado&full=true&idapp=1
It returns a JSON with the product, it is the content that JS uses to display the elements on the page. Ready. Instead of ordering the other page (which contains the JS), simply request the page that already has the information...
Shows what you’ve tried, can help...
– veroneseComS
tried the usual, searching for page tags to try reading the href content, but the open page in the browser is different from the one opened by GO, so I can’t find any tags I’m looking for
– VitorZF