First apologies for posting under the API-NG board its just that I feel that this appears to have a lot of knowledgeable respondents who follow this board.
So I have coded up my bot which is extracting the data I need out of BetFair and it appears to be working well.
What I want to do now is to scrape matching odds from other betting agencies to ensure I am getting the best odds at Betfair before putting my bet on.
I have seen plenty of VB NET examples where you
The problem is (to me) is the parsing part is quite ugly.
I remember in my VB6 days I could use something like ...
Dim mDocument As MSHTML.HTMLDocument objects
Dim A_collection As IHTMLElementCollection
However it has been a while since I have used the above and of course now I am using VB.NET with hopefully better methods.
From memory the above would return a collection which could be filtered using different HTML or XML tags passed in. ie we could pass in "SPAN" and get elements between the SPAN tags. Many betting sites format their data and use class names such as ...
<a class="RnrNameLink" target="_blank" href="/racing/formguide.aspx?year=2014&month=3&day=23&am p;meeting=NR&race=1#1"><span>TWISTED MILLER</span></a>
Therefore we could use <A> span and then look for the class="RnrNameLink" to help us locate the information.
So now I am in VB.NET, I am hoping there is some type of COM / DOM / XML / DHTML / MSHTML / object / class / ???? that we can set against the webresult that does all the hard formatting and parsing work, and then I simply drill down through some class or structure to extract the information I need
Or am I dreaming.
Troy
So I have coded up my bot which is extracting the data I need out of BetFair and it appears to be working well.
What I want to do now is to scrape matching odds from other betting agencies to ensure I am getting the best odds at Betfair before putting my bet on.
I have seen plenty of VB NET examples where you
- use a webclient
- send of a URL request
- get a response
- parse the text
The problem is (to me) is the parsing part is quite ugly.
I remember in my VB6 days I could use something like ...
Dim mDocument As MSHTML.HTMLDocument objects
Dim A_collection As IHTMLElementCollection
However it has been a while since I have used the above and of course now I am using VB.NET with hopefully better methods.
From memory the above would return a collection which could be filtered using different HTML or XML tags passed in. ie we could pass in "SPAN" and get elements between the SPAN tags. Many betting sites format their data and use class names such as ...
<a class="RnrNameLink" target="_blank" href="/racing/formguide.aspx?year=2014&month=3&day=23&am p;meeting=NR&race=1#1"><span>TWISTED MILLER</span></a>
Therefore we could use <A> span and then look for the class="RnrNameLink" to help us locate the information.
So now I am in VB.NET, I am hoping there is some type of COM / DOM / XML / DHTML / MSHTML / object / class / ???? that we can set against the webresult that does all the hard formatting and parsing work, and then I simply drill down through some class or structure to extract the information I need
Or am I dreaming.
Troy


Comment