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 +4 -4
- data/bin/console +1 -1
- data/lib/zooqle_search/search.rb +3 -2
- data/lib/zooqle_search/version.rb +1 -1
- 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: 19790b27b7e8a2e8848948973271407c26e3c6c7
|
4
|
+
data.tar.gz: c83033c654abfbd7896ee46ea1d680bceebd51df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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'
|
data/lib/zooqle_search/search.rb
CHANGED
@@ -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
|
-
|
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']
|
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
|
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-
|
11
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|