zooqle_search 1.0.0 → 1.0.1
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/link.rb +2 -0
- data/lib/zooqle_search/search.rb +1 -1
- 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: 6e2d98d960ba966bd24197a1c9f5d69db7f8b122
|
4
|
+
data.tar.gz: 14ec7f2a33deb973e290f3c7dcfc66159da40cc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a307f593a3ed1dd09ad3257328701725159909c1b036e3e123f3539ff02155f49515d3a3a115b94d9e2e5061ead4950bedc64dd4bddb732f364a6cd00b0eef7
|
7
|
+
data.tar.gz: 110572c97211504c35d26d284d9baeeee6fd26bb1b3675a6b5995c454933aa83d1de7cca390f6efcb34fb22fc9d1ae7970b8ae94cbb970aa75a7738eb4d605fa
|
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, search: '
|
13
|
+
search = build :search, search: 'silicon valley s03e08'
|
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/link.rb
CHANGED
@@ -29,6 +29,8 @@ module ZooqleSearch
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def download(path = './')
|
32
|
+
raise 'No download url provided' unless @download_url
|
33
|
+
|
32
34
|
response = HTTParty.get(@download_url)
|
33
35
|
|
34
36
|
raise 'Wrong content-type. Aborting.' unless response.headers['content-type'].include? 'application/x-bittorrent'
|
data/lib/zooqle_search/search.rb
CHANGED
@@ -47,7 +47,7 @@ module ZooqleSearch
|
|
47
47
|
|
48
48
|
size = link.at('.progress-bar').text
|
49
49
|
magnet = link.at('a[title="Magnet link"]')['href']
|
50
|
-
download_url = BASE_URL + link.at('a[title="Generate .torrent"]')['href']
|
50
|
+
download_url = BASE_URL + link.at('a[title="Generate .torrent"]')['href'] if link.at('a[title="Generate .torrent"]')
|
51
51
|
|
52
52
|
seeders_leechers = seeders_leechers['title']
|
53
53
|
seeders = seeders_leechers[/Seeders: (?<seeders>[\d,]+) \| Leechers: (?<leechers>[\d,]+)/, :seeders]
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
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-08-
|
11
|
+
date: 2016-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|