Their old site was easy. Now they use some Ajax loader to prevent easy html scraping. I've tried to send headers to replicate the action but no success. If you've been able to crack it let me know. This change is killing me right now! Had a cron job that gathered spreads but it's useless now.
Any PHP guys know how to Scrape Bovada's new site?
Collapse
X
-
akphideltSBR MVP
- 07-24-11
- 1228
#1Any PHP guys know how to Scrape Bovada's new site?Tags: None -
daneblazerBARRELED IN @ SBR!
- 09-14-08
- 27861
#2I'd guess that this is one reason they did the update, to prevent scrapes. They've been trying to chase away good bettors & poker players and cater to the common hamburger for the better part of their existence. Update just happened, so give it some time and I imagine someone will figure it out.Comment -
arwarSBR High Roller
- 07-09-09
- 208
#3site updates
Pinny changed their site too, now they want to charge for lines. Benji over at Don Best says the package they offer is about $1000/month. aside from why you want Bovada data, sned me a PM and maybe i can point you in the right direction. AJAX is a pain because it can change a single value withou having to make a return trip to the server. that being said, it has sort have fallen out of favor. most of the coders for the books are now relying on jquery, probably because it's so damned overwhelming to look at the code. but i know some tricks that can get around both of those methods. i don't know if it is true but SBR used to be a pain because of nested htmls combined with a database query - so had to use the readystate method in the DOM model. But they aren't the best site to scrape anyway. I only like helping people so talk.Comment -
akphideltSBR MVP
- 07-24-11
- 1228
#4Pinny changed their site too, now they want to charge for lines. Benji over at Don Best says the package they offer is about $1000/month. aside from why you want Bovada data, sned me a PM and maybe i can point you in the right direction. AJAX is a pain because it can change a single value withou having to make a return trip to the server. that being said, it has sort have fallen out of favor. most of the coders for the books are now relying on jquery, probably because it's so damned overwhelming to look at the code. but i know some tricks that can get around both of those methods. i don't know if it is true but SBR used to be a pain because of nested htmls combined with a database query - so had to use the readystate method in the DOM model. But they aren't the best site to scrape anyway. I only like helping people so talk.
I looked at the source code for bovada, and all it's main content is created after the page loads, they have a maze of headers being sent and anonymous functions to make it very difficult. This will require some work but if they can show it on a screen it can be captured. I'm sure they provide higher end sites with an xml access. I'll keep my progress updated. Thanks again.Comment -
EXhoosier10SBR MVP
- 07-06-09
- 3122
#5more clunky, but you could always use SeleniumComment -
akphideltSBR MVP
- 07-24-11
- 1228
#7I figured it out and it was much more simple than I thought, just didn't think of it. They store all the game information in a script at the beginning, then they load the html structure without the game data with ajax, then they attach the data to the new html with a javascript function. This was tricky because the responses weren't giving me any game information, took a while to figure it out... but you actually don't need to worry about their ajax at all, just have to parse their javascript which is not that difficult. So all is good again.Comment -
akphideltSBR MVP
- 07-24-11
- 1228
#8Not gonna give all the code away on the Internet. If you have questions, PM me... but just to get people started in the right direction. The site doesn't allow javascript tags so when you see $cript it should be script.
Code:$url = 'https://sports.bovada.lv/baseball/mlb/game-lines-market-group'; $html = file_get_html($url); preg_match_all('/<$cript(.*?)<\/script>/is', $html, $matches); foreach($matches[1] as $key => $match) { $regex = '/type="text\/javascript">var swc_market_lists =[\s]?[^{]*([^;]*)/i'; preg_match($regex, $match, $gameMatch); if(isset($gameMatch[1])) { $matchups = json_decode($gameMatch[1]); } }
Last edited by akphidelt; 08-02-15, 05:28 AM.Comment -
akphideltSBR MVP
- 07-24-11
- 1228
#9Originally posted by MisterClevelandNoob here, what exactly is scraping? Compiling lines from a sportsbook for easier, more personal access?Comment
SBR Contests
Collapse
Top-Rated US Sportsbooks
Collapse
#1 BetMGM
4.8/5 BetMGM Bonus Code
#2 FanDuel
4.8/5 FanDuel Promo Code
#3 Caesars
4.8/5 Caesars Promo Code
#4 DraftKings
4.7/5 DraftKings Promo Code
#5 Fanatics
#6 bet365
4.7/5 bet365 Bonus Code
#7 Hard Rock
4.1/5 Hard Rock Bet Promo Code
#8 BetRivers
4.1/5 BetRivers Bonus Code