vegas_insider_scraper 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sports/scraper_league.rb +6 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d425de24359f9385ce2ed1e3fcdfa7f7cc244cf2
4
- data.tar.gz: dc98aa425d554263bf3ac16a87fd16ffb0519177
3
+ metadata.gz: 6c94fb8ed7b0efd7768bae52ed5fc84af3fd5de2
4
+ data.tar.gz: 39c3e78a3e7809c85782af4222fef40424c9503e
5
5
  SHA512:
6
- metadata.gz: 7ab91a65394fc48ae254a603a97efe24a710d11d1dcb637c10283251fad95ee69ca1583d91c95ddb6ca8c0704da4c1c9fff7b071b5ac9a9571b920bcf0f49cee
7
- data.tar.gz: 2d40c323c4d830bde49742f9d64a9778cb730ca3414ce213f9cb1d3073930a2f66e5ec44269e7caae816a27e0d3a3587334a3d1d8fc00a9e224f450d45cfddcb
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vegas_insider_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Reitz