vegas_insider_scraper 0.0.3 → 0.0.4
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 +5 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b5e326669ebe27449ac3720449868e5f899c45f
|
4
|
+
data.tar.gz: d51d9cf641b6e871a3b000aa08890ae8568537f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ada543878c491f39cdf85a255f95a9dd44f04a61c17501a7d1f69d42e8c1045780a7704466891a156342a8525362d23d236c257846425fe6536d5c8f727552d
|
7
|
+
data.tar.gz: 22d40123c6407930da35ca9204785b756c812b3ebaeae54e6084fb29f7e3743601f55efab589a691d1e04a2becc72a825ca4585d7b6c809d0cdd67dcb2d7a095
|
@@ -250,18 +250,17 @@ class ScraperLeague
|
|
250
250
|
game_cell = game_row.at_css('td:first-child')
|
251
251
|
teams = game_cell_parser(game_cell)
|
252
252
|
game = Game.new(home_team: teams[1], away_team: teams[0])
|
253
|
+
|
253
254
|
if game.teams_found?
|
254
255
|
game.update(time: get_game_time(game_cell))
|
256
|
+
game.update(doubleheader: doubleheader_id(game_row.next&.next&.at_css('td:first-child')&.content))
|
255
257
|
is_first_url ? (games.push game) : (game = game.find_equal(games))
|
256
258
|
game.update(vegas_info: get_line(get_odds(game_row)))
|
257
259
|
game.update(vegas_info: get_line(get_odds_inner_html(game_row)))
|
258
260
|
|
259
|
-
|
261
|
+
elsif is_first_url
|
260
262
|
last_game = games.last
|
261
|
-
if last_game
|
262
|
-
last_game.update(notes: game_cell.content)
|
263
|
-
last_game.update(doubleheader: doubleheader_id(game_cell.content))
|
264
|
-
end
|
263
|
+
if last_game then last_game.update(notes: (last_game.notes ? "#{last_game.notes} / " : '') + game_cell.content) end
|
265
264
|
end
|
266
265
|
end
|
267
266
|
}
|
@@ -496,7 +495,7 @@ class ScraperLeague
|
|
496
495
|
end
|
497
496
|
|
498
497
|
def find_equal(games)
|
499
|
-
games.
|
498
|
+
games.detect { |g| g == self }
|
500
499
|
end
|
501
500
|
|
502
501
|
def ==(other_game)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vegas_insider_scraper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Reitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|