vegas_insider_scraper 0.0.12 → 0.0.13

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 +10 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecf4fe58271c626cf768229525c29723d7f5f0ae
4
- data.tar.gz: ce909c77fb91d50cd29f6f519bd5054f3007af27
3
+ metadata.gz: 31521cd9587bede7c4d45c2ef39dae365ed1b414
4
+ data.tar.gz: df5b14fb5b2ae7e090ee4e69d082e2499233a8b9
5
5
  SHA512:
6
- metadata.gz: d4f23dff1e19c18716b8f5b7ff8ceeec06b355adb792715591f8f4b6679c01017be3a49d4db829256072292e71bd7464efdbaba6d3f870f794a74fbfcdbbc19f
7
- data.tar.gz: 6791e1112b8fd809686f361b778708a32405773e1a66536e8336e9b4f0786a51fbf86c3509ec73f6e4f6cc28a56ffabfb78ebcedd762ee418540193c0a3449fa
6
+ metadata.gz: 7df570e82c5b6b63e0f642e9db267f205437c4eb946c0bf5b374d914b71dc8dabb8089d84d522436f8340df47179705352a1da9eb1d9ddc1834736a34b885651
7
+ data.tar.gz: d5d705f94a405e88156a88baee61e4d8ec13d92a7d7052639c706cc64589c6b18e7a4cc2868a52d99d99bccf1d67f6ad5de29a44e93d22cfdec9eb1bb8c765b1
@@ -44,8 +44,14 @@ class ScraperLeague
44
44
  doc.css(standings_table_class).each do |conference|
45
45
 
46
46
  conference_title = conference.at_css(".viHeaderNorm")
47
+
47
48
  next if conference_title.nil?
49
+ puts "***********************************"
50
+ puts conference_title.content
51
+ puts "***********************************"
52
+
48
53
  table = conference.css('.viBodyBorderNorm table')[standings_table_index]
54
+ table = conference.css('.viBodyBorderNorm table')[2] if conference_title.content == 'Conference USA'
49
55
 
50
56
  if table
51
57
  table.css('tr').each_with_index do |row, index|
@@ -107,7 +113,9 @@ class ScraperLeague
107
113
  row.css('td').each_with_index do |cell, cell_index|
108
114
  value = remove_element_whitespace(cell)
109
115
  case cell_index
110
- when 0 then team[:info] = format_college_team(cell.at_css('a'), teams_doc)
116
+ when 0
117
+ puts value
118
+ team[:info] = format_college_team(cell.at_css('a'), teams_doc)
111
119
  when 5 then team[:record][:overall_wins] = value.to_i
112
120
  when 6 then team[:record][:overall_losses] = value.to_i
113
121
  when 9 then team[:record][:home_wins] = value.to_i
@@ -217,6 +225,7 @@ class ScraperLeague
217
225
  # Utility method for scraping standings
218
226
  # * formats the team using the URL and the Nokogiri document for the teams page
219
227
  def format_college_team(url, teams_doc)
228
+
220
229
  full_name = team_page_full_name(teams_doc, url)
221
230
  location = url.content.gsub('AM', 'A&M').gsub('AT', 'A&T')
222
231
  identifier = team_url_parser(url.attribute('href'))
@@ -327,8 +336,6 @@ class ScraperLeague
327
336
 
328
337
  result = odds.merge(runlines_odds).merge(moneyline_odds)
329
338
 
330
- puts odds_string
331
-
332
339
  result.each { |k,v| result[k] = result[k].to_s.to_f if result[k] }
333
340
  get_home_and_away(result)
334
341
 
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.12
4
+ version: 0.0.13
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-07-11 00:00:00.000000000 Z
11
+ date: 2017-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri