soccerwiki 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50feffb477b2043b5e1b67b2d067364de89ffab8
4
- data.tar.gz: ceef2a48de3bcfa848254d89d5e9dcc053b48400
3
+ metadata.gz: 005bb615a90a26c8b37526d186a89e41889d1714
4
+ data.tar.gz: 4ff106b3635188a43dc5a13388b29dbf51610a72
5
5
  SHA512:
6
- metadata.gz: fdc0745e16f5a2f64a57696b6653d58c18478475665c578c26999a869b0b8a4f8fd81e95051525f126e7bb8440ac79e3540e0595d5cd033ebeda5291e9ba6072
7
- data.tar.gz: 5cbe72b97e826840455044f1d22c864803bdfde8e7fa599e2e050cbc113acacd964b5cc764336aca927cba38c07e29680cbe1a7229170b62b29f07e95bcc94b9
6
+ metadata.gz: 20e1d9b3c29ccc23be96bc73cbade4f1c44f0ea0a128115cd24e9fe57ba92f3dd44333d5ad3c03eebb09d6900dd37f4c05bc0380aca1ee9da0147d4db4e4cf0d
7
+ data.tar.gz: aa277d7bcac9160874202b18f2f1438c0af6a3e59adf97ace10d957393eb9de53a5bc4e450a52dbfd5670256006587d117da6cb98aee17badbca0fe5c2c3a45c
@@ -41,12 +41,17 @@ module Soccerwiki
41
41
  end
42
42
 
43
43
  def self.search(player_name)
44
+ puts "Searching player #{player_name}"
44
45
  req = self.get("/wiki.php", query: {action: "search", "searchType" => "players", q: player_name})
45
46
  if req.code.to_i != 200
47
+ puts "RESPONSE #{req.code}"
46
48
  []
47
49
  else
48
50
  html_doc = Nokogiri::HTML(req.parsed_response)
49
- players_links = html_doc.xpath('//div[@id="searchResultsDiv"]//div//div//div[2]//table//tr/td[2]/a').collect {|a| a["href"]}
51
+ puts "Using version #{Soccerwiki::VERSION}"
52
+ puts "Searched #{player_name}"
53
+ players_links = html_doc.xpath('//div[@id="searchResultsDiv"]//table/tr/td[2]/a').collect {|a| a["href"] }
54
+ puts "Found #{players_links.count}"
50
55
  players = players_links.collect do |player_link|
51
56
  player_id = player_link.match(/\=([0-9]*)/)[1]
52
57
  self.find_by_id(player_id)
@@ -1,3 +1,3 @@
1
1
  module Soccerwiki
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soccerwiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elad Meidar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-18 00:00:00.000000000 Z
11
+ date: 2013-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler