livescore-parser 0.1.8 → 0.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0063e2d8ae604cdfed8f325850b0649ea6e8785d
4
- data.tar.gz: 0f1ec71d321d6962ce0ba91bd1a2d61dca5c1585
3
+ metadata.gz: 939d288eddd031ead456ec7592f8b1422a6eb717
4
+ data.tar.gz: 86de59970caf1cf9e66786ec57c48de6f2e9005c
5
5
  SHA512:
6
- metadata.gz: 4987586cef98c443fea3ee8317fd234c6d2b54c759a83ec6028a5cc1250f9d6de56c3aefd4844bbf5914c280b888e1aebdf96a1e7b2d852ce31f943fb5c7a2ef
7
- data.tar.gz: 87065dfa7bb2d74bd4dfa45389c90db38b259d62597b1e74e74fc927b62aaa7ab875b2eed8d474fc75daaf504a89f4718d364565c0d221300902e3d4b24cbc0f
6
+ metadata.gz: 5bad131ab92225f157f0370c9c09d2fee3aacfa7d6e33aba2249242ff2151ecce73ed07da464e80fb485b638c4340a86df24a738c357c98b21666ba6423f421f
7
+ data.tar.gz: c82083a432c4e7d020cb947e7fa244d90b5640cdd058504c8806ab3cf28bb1a74095872db5b50667090e9e465202a608562b503d10ddb161812dedff58b11514
@@ -20,7 +20,7 @@ module LivescoreParser
20
20
 
21
21
  def download(url)
22
22
  page = Nokogiri::HTML(@agent.get(url).body)
23
- data = build_hash page.css(".content .row, .content .row-gray")
23
+ data = build_hash page.css(".content > *")
24
24
  if data.empty?
25
25
  puts "Missing data"
26
26
  return nil
@@ -43,10 +43,10 @@ module LivescoreParser
43
43
  wynik1: row.css('.sco').text.strip.match(/^[0-9\?]+/).to_s,
44
44
  gracz2: row.css('.sco + .ply').text.strip,
45
45
  wynik2: row.css('.sco').text.strip.match(/[0-9\?]+$/).to_s,
46
- data: @date,
47
- kraj: @country
46
+ data: @date.clone,
47
+ kraj: @country.clone
48
48
  }
49
- else
49
+ elsif row.attr('class').match 'row-tall'
50
50
  @country = row.css('.left strong').text.strip
51
51
  @date = row.css('.right').text.strip
52
52
  next
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livescore-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Walusiak