I do a lot of scraping and haven't come across this before. The
response isn't returning any of the text from the tables.
Heres what I get on the return.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="60;
URL=/cgi-bin/totedb/pools.cgi?track=PHA&type=0&percent=true">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<LINK HREF="/bris_styles/tote.css" TYPE="text/css" REL="stylesheet">
<STYLE><!-- a:hover {color: #FFCC33; text-weight: bold;
text-decoration:underline} .linkbtn {color: #FFFFFF; font-size:11pt;
background-color: #008E00; text-decoration: underline; cursor: hand}
..tabfront {color:#FFCC33; font-size:11pt; background-color: #006600;
border: 1px #006600 solid} --></STYLE>
</HEAD>
<BODY ONLOAD="window.setTimeout('window.location.href =
window.location.href', 55000);" CLASS="poolsDoc">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx
Immediately following this I should be getting
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx
<A class="linkbtn"
HREF="/cgi-bin/totedb/pools.cgi?track=PHA&type=0"> Pools </A> <B
class="tabfront"> Percentages </B>
<TABLE WIDTH="100%" BORDER="1" CELLPADDING="2" CELLSPACING="0"
CLASS="poolsTable">
<TR ALIGN="CENTER">
<TD WIDTH="12%" CLASS="trackHeader">Track</TD>
<TD WIDTH="4%" CLASS="raceHeader">Race</TD>
<TD WIDTH="5%" CLASS="postHeader">Post</TD>
<TD WIDTH="4%" CLASS="mtpHeader">MTP</TD>
<TD WIDTH="3%" CLASS="pp1Header">1</TD>
<TD WIDTH="3%" CLASS="pp2Header">2</TD>
<TD WIDTH="3%" CLASS="pp3Header">3</TD>
etc..
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx
I went back to some old excel vba code I have and put in my url and ran
it as a hidden instance of IE and it worked fine. Can somebody maybe
give me some pointers? Or maybe I should use hidden IE and strip the
html from it, but I think this might be the long way around and
probably not effecient.
Heres the request code I've been using
Private Sub getstringdata(ByVal sender As Object, ByVal e As
System.Timers.ElapsedEventArgs)
'STEP 1: Create a WebClient instance
Dim objWebClient As New WebClient
Dim urllink As String
Dim strRequestedHTML As String
Dim test As String
Dim txtHTML As String
Dim Trackid As String
Trackid = ComboBox1.Text
urllink =
"http://www.brisnet.com/cgi-bin/totedb/pools.cgi?track=" & Trackid &
"&percent=true&type=0"
'STEP 2: Call the DownloadedData method
Dim aRequestedHTML() As Byte
aRequestedHTML = objWebClient.DownloadData(urllink)
'STEP 3: Convert the Byte array into a String
Dim objUTF8 As New UTF8Encoding
strRequestedHTML = objUTF8.GetString(aRequestedHTML)
txtHTML = strRequestedHTML
Call parsestring(txtHTML, sender, e)
End Sub