|
-
Oct 3rd, 2022, 01:44 PM
#1
Thread Starter
Lively Member
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
Last edited by matty95srk; Oct 3rd, 2022 at 02:27 PM.
-
Oct 3rd, 2022, 04:34 PM
#2
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.
My usual boring signature: Nothing
 
-
Oct 3rd, 2022, 05:04 PM
#3
Thread Starter
Lively Member
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..
-
Oct 10th, 2022, 04:38 PM
#4
Member
Re: How to parse this huge html?
 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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|