Results 1 to 9 of 9

Thread: [RESOLVED] [2008] Need help with: Parsing HTML

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Location
    London
    Posts
    164

    Resolved [RESOLVED] [2008] Need help with: Parsing HTML

    Hello.
    I successfully wrote a code to retrieve a version number from a HTML page which is this code:
    HTML Code:
    <div class="header">Latest Version: <span class="version">6.59</span></div>
    Using this code:
    VB Code:
    1. Dim src As String
    2.         Dim net As New Net.WebClient()
    3.  
    4.         src = net.DownloadString("http://site.com")
    5.  
    6.         version = src.Substring(InStr(src, "Latest Version:", CompareMethod.Text) + 33, 4)
    So the following code will return the version number which currently is 6.59 which is what I'm after.


    But then i remembered that releases are done as following: 6.59, 6.59b, 6.59c, 6.60, 6.60b etc.

    So when the b version of 6.59 is released the parser will still return 6.59. So how can i make this code better?

    Thank you
    Last edited by n00b scripter; Jan 26th, 2009 at 07:14 PM.

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