4
I recently learned how to make web scraping and I got it on some sites, but others I can’t. I noticed that in some of the ones I can’t get there’s an "#", what that means?
Let me give you an example of a site where this happens to me. https://www.meusresultados.com/jogo/IV9KYMDp/#h2h;Overall
Also there is some way to make web scraping on this site?
I usually do this:
var wc = new WebClient();
wc.Encoding = Encoding.UTF8;
var pagina = wc.DownloadString(url);
var htmlDocument = new HtmlAgilityPack.HtmlDocument();
htmlDocument.LoadHtml(pagina);
And then I find what I want.
have as it has... but have to see what you are doing...
– Rovann Linhalis
Like I gotta see what I’m doing?
– Diogo Sousa
this...had to see the code you’re using... and, is not working because this code will only receive the server html in a request... many sites work with javascript and will load the data after the page is loaded... so when you receive the html there is no data there...
– Rovann Linhalis
So how can I proceed to get this data?
– Diogo Sousa
is a gambiarra... but could use a webbrowser, after the event
DocumentComplete
You wait a while (to load javascript) and then you get access to the browser’s html.... I took a quick look at the site, I did not find the addresses that the ajax request is made... so... I think only in the same gambiarra...– Rovann Linhalis
I had tried with webbrowser, but it didn’t work. It must be complicated
– Diogo Sousa