vegas_insider_scraper 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sports/scraper_league.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c94fb8ed7b0efd7768bae52ed5fc84af3fd5de2
|
4
|
+
data.tar.gz: 39c3e78a3e7809c85782af4222fef40424c9503e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 682353c9abe742b04aff4d779410618eadeb9f410456e04753c2ff1b7c7d4d8b8792cb41a114f410c9855e893412519d83df9c99472223278e646c0adc123d58
|
7
|
+
data.tar.gz: 99eb5171bae326919b972f60185edf6c0a8d9a2560974ccb8279c25aeb990497be4c9454abedd984a4fc091f296937a2e9014bfecc27cc2b6e146404429c8e08
|
@@ -297,11 +297,15 @@ class ScraperLeague
|
|
297
297
|
# Utility method for scraping current lines
|
298
298
|
# * parsing the lines for non-moneyline sports
|
299
299
|
def get_line(odds_string)
|
300
|
+
odds_string = odds_string.gsub('PK', '-0')
|
300
301
|
odds = matchdata_to_hash(RegularExpressions::ODDS.match(odds_string)) || {}
|
301
302
|
runlines_odds = matchdata_to_hash(RegularExpressions::RUNLINE_ODDS.match(odds_string)) || {}
|
302
303
|
moneyline_odds = matchdata_to_hash(RegularExpressions::MONEYLINE_ODDS.match(odds_string)) || {}
|
303
304
|
|
304
305
|
result = odds.merge(runlines_odds).merge(moneyline_odds)
|
306
|
+
|
307
|
+
puts odds_string
|
308
|
+
|
305
309
|
result.each { |k,v| result[k] = result[k].to_s.to_f if result[k] }
|
306
310
|
get_home_and_away(result)
|
307
311
|
|
@@ -462,8 +466,8 @@ class ScraperLeague
|
|
462
466
|
MONEYLINE_OVER_UNDER = /(?<ou>\d+(\.5)?)[ou]/x
|
463
467
|
|
464
468
|
ODDS = /(<br><br>(?<home_line>-\d+(\.5)?))|(<br>(?<away_line>-\d+(\.5)?)[+-]\d\d<br>)|
|
465
|
-
((?<over_under>\d+(\.5)?)[ou]-\d{2}(?<home_line>-\d+(.5)?)-\d\d\z)|
|
466
|
-
((?<away_line>-\d+(.5)?)-\d\d(?<over_under>\d+(\.5)?)[ou]-\d{2}\z)/x
|
469
|
+
((?<over_under>\d+(\.5)?)[ou]((-\d{2})|EV)(?<home_line>-\d+(.5)?)-\d\d\z)|
|
470
|
+
((?<away_line>-\d+(.5)?)-\d\d(?<over_under>\d+(\.5)?)[ou]((-\d{2})|EV)\z)/x
|
467
471
|
RUNLINE_ODDS = /(?<away_line>(\+|-)\d+(\.5)?)\/(\+|-)\d{3}(?<home_line>(\+|-)\d+(\.5)?)\/(\+|-)\d{3}/
|
468
472
|
MONEYLINE_ODDS = /((?<over_under>\d+(\.5)?)[ou]-\d{2})?(?<away_moneyline>(\+|-)\d{3}\d*)(?<home_moneyline>(\+|-)\d{3}\d*)/
|
469
473
|
|