How to parse this huge html?
HI, I'm trying to parse some values from a web page using http webrequest but the html code is really really weird to me..
I'm trying to help my self with an old question using html agility pack but this time the html is quite difficult to parse the values.
I'm trying to get the live results from tennis matches and the name of their relatives players who are playing from a web sport page.
Is that possible to parse it something like this
Code:
[players] [sets] [score]
player 1 1 15
vs
player 2 5 30
etc
Hope it would be possible
Thanks
Re: How to parse this huge html?
If there is ANY way to do this other than scraping a web site, you should use it. Many sites will provide APIs that expose the data in a more stable, manageable way, and if one is available, that will be a decidedly superior way to go about it.
The big issue with scraping a web page is that it will stop working sooner or later, and usually sooner. Web mavens can't resist changing around the designs of their pages, and whenever they make a change, your code will break. If the site is quite active, those changes could happen almost daily, though they will likely be less frequent than that.
Re: How to parse this huge html?
Unfortunately i really need that website cause is the fastest updating the scores and it doesn't provide any api..
Re: How to parse this huge html?
Quote:
Originally Posted by
matty95srk
Unfortunately i really need that website cause is the fastest updating the scores and it doesn't provide any api..
First thought,
Can you save the html first, then try opening with Excel, and observe?
You can also search around for 'Convert Html to..." tools, like this one:
https://www.convertcsv.com/html-table-to-csv.htm