torrent_api 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -1
- data/Rakefile +1 -1
- data/lib/pirate_bay/base.rb +2 -2
- data/lib/pirate_bay/details.rb +1 -1
- data/torrent_api.gemspec +2 -2
- metadata +2 -20
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
data/lib/pirate_bay/base.rb
CHANGED
@@ -49,7 +49,7 @@ module PirateBay
|
|
49
49
|
def get_quality
|
50
50
|
execute
|
51
51
|
results = @results.map do |result|
|
52
|
-
url = "http://www.thepiratebay.
|
52
|
+
url = "http://www.thepiratebay.se/torrent/#{result.id}/"
|
53
53
|
html = open(url).read
|
54
54
|
p = PirateBay::Details.new html, :init
|
55
55
|
puts "Fetching results"
|
@@ -74,7 +74,7 @@ module PirateBay
|
|
74
74
|
|
75
75
|
|
76
76
|
def fetch_search_results
|
77
|
-
url = "http://thepiratebay.
|
77
|
+
url = "http://thepiratebay.se/search/#{search_string}/#{page}/7/#{category_id}" # highest seeded first
|
78
78
|
|
79
79
|
uri = URI.parse(url)
|
80
80
|
|
data/lib/pirate_bay/details.rb
CHANGED
@@ -18,7 +18,7 @@ module PirateBay
|
|
18
18
|
def fetch_comments(params)
|
19
19
|
index = params[:page] - 1
|
20
20
|
if @comment_pages_html[index].nil?
|
21
|
-
uri = URI.parse('http://thepiratebay.
|
21
|
+
uri = URI.parse('http://thepiratebay.se/ajax_details_comments.php')
|
22
22
|
res = Net::HTTP.post_form(uri, params)
|
23
23
|
response = res.body
|
24
24
|
@comment_pages_html[index] = response
|
data/torrent_api.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "torrent_api"
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["James Hart"]
|
9
|
-
s.date = "2012-
|
9
|
+
s.date = "2012-02-03"
|
10
10
|
s.description = "An API to query popular torrent websites"
|
11
11
|
s.email = "hjhart@gmail.com"
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "README.markdown", "lib/demonoid/base.rb", "lib/demonoid/result.rb", "lib/demonoid/result_set.rb", "lib/pirate_bay/base.rb", "lib/pirate_bay/categories.rb", "lib/pirate_bay/details.rb", "lib/pirate_bay/result.rb", "lib/pirate_bay/result_set.rb", "lib/torrent_api.rb", "lib/torrent_reactor/base.rb", "lib/torrent_reactor/result.rb", "lib/torrent_reactor/result_set.rb"]
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torrent_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 29
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 5
|
10
|
-
version: 0.2.5
|
5
|
+
version: 0.2.6
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- James Hart
|
@@ -15,7 +10,7 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2012-
|
13
|
+
date: 2012-02-03 00:00:00 Z
|
19
14
|
dependencies:
|
20
15
|
- !ruby/object:Gem::Dependency
|
21
16
|
name: nokogiri
|
@@ -25,9 +20,6 @@ dependencies:
|
|
25
20
|
requirements:
|
26
21
|
- - ">="
|
27
22
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
|
-
segments:
|
30
|
-
- 0
|
31
23
|
version: "0"
|
32
24
|
type: :runtime
|
33
25
|
version_requirements: *id001
|
@@ -39,9 +31,6 @@ dependencies:
|
|
39
31
|
requirements:
|
40
32
|
- - ">="
|
41
33
|
- !ruby/object:Gem::Version
|
42
|
-
hash: 3
|
43
|
-
segments:
|
44
|
-
- 0
|
45
34
|
version: "0"
|
46
35
|
type: :runtime
|
47
36
|
version_requirements: *id002
|
@@ -102,19 +91,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
91
|
requirements:
|
103
92
|
- - ">="
|
104
93
|
- !ruby/object:Gem::Version
|
105
|
-
hash: 3
|
106
|
-
segments:
|
107
|
-
- 0
|
108
94
|
version: "0"
|
109
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
96
|
none: false
|
111
97
|
requirements:
|
112
98
|
- - ">="
|
113
99
|
- !ruby/object:Gem::Version
|
114
|
-
hash: 11
|
115
|
-
segments:
|
116
|
-
- 1
|
117
|
-
- 2
|
118
100
|
version: "1.2"
|
119
101
|
requirements: []
|
120
102
|
|