Results 1 to 4 of 4

Thread: How to parse this huge html?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2013
    Posts
    108

    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.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    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

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2013
    Posts
    108

    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..

  4. #4
    Member
    Join Date
    Dec 2015
    Posts
    38

    Re: How to parse this huge html?

    Quote Originally Posted by matty95srk View Post
    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
  •  



Click Here to Expand Forum to Full Width