Hey Guys,
What i'm trying to do here is loop a webbrowser control to go to the next page of a site:
After this page has been loaded and the data extracted we want to go to:
then
etc
etc
In increments of 200, i can't think of the bets way to loop the web browser.
any help would be great guys!
cheers
Graham
What i'm trying to do here is loop a webbrowser control to go to the next page of a site:
Code:
WebBrowser.Navigate("http://site.com/?start=200&flimit=200")
'// CHECK BROWSER STATE
If WebBrowser.ReadyState <> WebBrowserReadyState.Complete Then
Dim html As String = WebBrowser.DocumentText
Dim pattern As String = "(?<=<td class=""field_domain""><a href="".+"" target=""_blank"" rel=""nofollow"" title="".+"">).+(?=</a></td>)"
Dim rx As New Regex(pattern, RegexOptions.IgnoreCase Or RegexOptions.Compiled)
'// LOOP THE MATCHES OUT
Dim mc As MatchCollection = Regex.Matches(html, pattern)
For Each m In mc
listviewMain.Items.Add(m.ToString)
Next
Else
statusStrip.Text = "Loading..."
End If
Code:
http://site.com/?start=400&flimit=200
Code:
http://site.com/?start=600&flimit=200
etc
In increments of 200, i can't think of the bets way to loop the web browser.
any help would be great guys!
cheers
Graham