Похожие чаты

What library do you guys use in Go for web

automation / web scraping?

Sometimes a library such as go-colly won't suffice because you might need to click some buttons before reaching the webpage to be scraped, as in selecting the language of the website and accepting cookies upon opening it.

I found go-rod and chromedp, but they seem to lack behind in terms of issue resolution and available features compared with libraries such as Puppeteer.

4 ответов

27 просмотров

I manually copy http requests and implement a web API for the target

Pedro-Aguiar Автор вопроса

I manually copy http requests and implement a web ...

What if the website in question doesn't allow you to skip those steps by passing parameters to the HTTP requests? Idk what this is called, or whether it's some sort of obfuscation technique, but websites such as StockX ask the user to pick a language upon accessing the website, and after you do, regardless of what language you chose, the URL remains the same.

Pedro Aguiar
What if the website in question doesn't allow you ...

No matter what, if you copy http requests step by step from browser's network tab or a tool like Fiddler, and implement those steps in a programming language, you'd be able to scrape content and even submit forms. There's one challenging case though and that is with websites protected by captcha. Some people bypass that as well using OCRs or AI. If the website is asking you to choose the language, it means it sending an http request to set your language. That's the first request to implement.

Pedro-Aguiar Автор вопроса
Pedro Aguiar
What if the website in question doesn't allow you ...

For anyone wondering how I solved this, @ali_error (thanks again!) dead right: checking for hidden API is far more effective than scraping data from the frontend. Both of the websites I had to work with in that project have a hidden API that can be consumed as long as you have a Cookie, which is a game changer. The following video encapsulates the idea of what they were referring to by their answer. [1] https://www.youtube.com/watch?v=G7s0eGOaRPE

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта