Lefora Free Forum

tams's Blog

Member For: 1 year
Posts: 15

Member of: Diybetfairbots Forum.
Top Post By tams (most thumbs up):

No posts received thumbs up, next time you see a good one, give some respect and thumb it up.

Recent Posts by tams:

Re: Scraping the BF results page

October 4, 2009 by tams

Brilliant mate, thanks!

Scraping the BF results page

October 1, 2009 by tams

Anyone know if it's possible to scrape the results from the betfair results page:

http://form.horseracing.betfair.com/timeform#

Cheers
Tams

Re: scraping prevention

May 17, 2009 by tams

.setRequestHeader "Pragma", "no-cache"
.setRequestHeader "Cache-Control", "no-cache"


Re: scraping prevention

May 17, 2009 by tams

I'm using Visual Basic Express and also MS Access on Vista. PC where it works has XP.

I've tried ActiveX Data Objects, MS HTML, MS XML 6, WinHTTP 5.

Not web browser component.

Data refreshes okay with IE.


Re: scraping prevention

May 15, 2009 by tams

Not sure what the problem is, but by stopping and restarting my program, it somehow retrieves dynamic data, but that's impractical.

A workaround I found is to include a random number in the url. That'll do me until I find something better.


Re: scraping prevention

May 15, 2009 by tams

Thanks, that explains Betfair, but with regard to the other site, my code works fine on another PC, but not on my own. And it's unlikely that my PC has been blocked in any way.

scraping prevention

May 14, 2009 by tams

Some sites, including Betfair, appear to be employing some means to prevent scraping.

When I scrape the prices from Betfair once per second, they only update after five seconds. On another site, dynamic data appears static when scraped.

Anybody know how they do this and how we get round it?


Re: Error using API

April 3, 2009 by tams

It was because my PC was going to sleep.

Resolved.

thanks

Re: Error using API

April 2, 2009 by tams

Thanks pete, but I don't think it's about "keeping alive". My program queries the API every 15 seconds. I believe it should keep the connection for up to 20 minutes without querying.


Error using API

April 1, 2009 by tams

From time to time, I'm receiving this error from the API (free)

"The underlying connection was closed: A connection that was expected to be kept alive was closed by the server"

Anybody had experience with this and managed to fix it?

Re: Scraping

November 7, 2008 by tams

Yes I have modified the post data, as I said above. username=XXXXXXXX&password=XXXXXXXX
Url = https://www.betfair.com/account/login/LoginAction.do

As I said, I get a one of two errors by running your code repeatedly.

One error is that the Status is 302 and the Location is 'http://betfair.comnull'.

The other error is that the Status is 200, but there is no Location returned.

Re: Scraping

November 7, 2008 by tams

I was asking if anyone could spot the problem with my code (or yours) for logging in to the main Betfair site.

Re: Scraping

November 7, 2008 by tams

I agree that it's normally pretty easy, but this has me completely stumped. I'm able to login to the lite site okay, but that doesn't have all of the info that I need. I can also get the market data from the main site which doesn't require logging in.

Anyone else that is scraping Betfair that could point me in the right direction?

Re: Scraping

November 7, 2008 by tams

Thanks for that birchy, but it's still not working (on two different computers).

Interestingly I receive one of two different errors when I run it repeatedly.

Firstly when I check the headers in .getAllResponseHeaders, Location is not included. Then the next time I run it, Location is included, but the value is 'http://betfair.comnull'.

I've also tried it with and without "languageSelector=en%2CGBR&" at the start of PostData, but receive the same result. I use Fiddler, and I'm not seeing "languageSelector=en%2CGBR&" as part of PostData.

Scraping

November 6, 2008 by tams

I'm having problems logging into the main Betfair site using MS Access and VBA.

Set xml = CreateObject("MSXML2.ServerXMLHTTP.6.0")

xml.Open "POST", "https://www.betfair.com/account/login/LoginAction.do", False
xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xml.send "username=XXXXXXXX&password=XXXXXXXX"

Anyone any ideas where I'm going wrong?

Tams