zooqle_search 0.0.2 → 1.0.0

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: 15a7e692f31d9a9397a170c18d7c1715e6673df5
4
- data.tar.gz: 6933fa77e4b99077b8674ba02907b2ca2f56ac5a
3
+ metadata.gz: 19790b27b7e8a2e8848948973271407c26e3c6c7
4
+ data.tar.gz: c83033c654abfbd7896ee46ea1d680bceebd51df
5
5
  SHA512:
6
- metadata.gz: 8282182566a7ade46f87feadea7ce231b53da7a98e675fb797749fbce38f5f1cac180bc6b17e9cd204d8df114fbcf6fe22be58b894caf7cbb8e643b817dc093b
7
- data.tar.gz: 78ddf1877436e49239dd06037fcd0e40c211277d4aae2f4d19d43dfa8d1053662e7dadbbcfd19bd8b18d916933ffaa856754c30226b0113b983dc5e8280a0ce8
6
+ metadata.gz: c4aa7b076c3823dcb0eb9ae1294fc2cd8fc701d7ea3bef4362f18e405f2bc0317990d7f6d75842955c7ddd8d9ca803ba8856c489d6d212a8e3f137b3b07b2681
7
+ data.tar.gz: 44fe3eccc736ebf617061429de74e5a9984fcba1c48a2c2e2568b06a3562e96704a5f3f54eaf1e238d5e738f6640994702c8086ddd724bfe643ce5ff92144dfb
data/bin/console CHANGED
@@ -10,7 +10,7 @@ FactoryGirl.find_definitions
10
10
  # You can add fixtures and/or initialization code here to make experimenting
11
11
  # with your gem easier. You can also use a different console, if you like.
12
12
  # link = build :link
13
- search = build :search
13
+ search = build :search, search: 'suits s06e05'
14
14
 
15
15
  # (If you use this, don't forget to add pry to your Gemfile!)
16
16
  require 'pry'
@@ -40,9 +40,10 @@ module ZooqleSearch
40
40
  crawled_links = page.css('.table-torrents tr')
41
41
 
42
42
  crawled_links.each do |link|
43
- filename = link.at('a').text
43
+ filename_node = link.at('a')
44
+ filename = filename_node.text if filename_node
44
45
  seeders_leechers = link.at('div[title^="Seeders:"]')
45
- next if filename.strip.empty? || seeders_leechers.nil?
46
+ next if filename_node.nil? || filename.strip.empty? || seeders_leechers.nil?
46
47
 
47
48
  size = link.at('.progress-bar').text
48
49
  magnet = link.at('a[title="Magnet link"]')['href']
@@ -1,3 +1,3 @@
1
1
  module ZooqleSearch
2
- VERSION = "0.0.2"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zooqle_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Marchante
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-24 00:00:00.000000000 Z
11
+ date: 2016-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri