get_proxy_list 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/debug.rb +1 -1
- data/lib/get_proxy_list.rb +2 -3
- data/lib/get_proxy_list/from_proxy_cn.rb +1 -0
- data/lib/get_proxy_list/version.rb +1 -1
- metadata +11 -5
- checksums.yaml +0 -15
data/lib/debug.rb
CHANGED
@@ -6,7 +6,7 @@ require File.expand_path("../get_proxy_list", __FILE__)
|
|
6
6
|
class Debug
|
7
7
|
# To change this template use File | Settings | File Templates.
|
8
8
|
include GetProxyList
|
9
|
-
list = GetProxyList.proxy_list(1,
|
9
|
+
list = GetProxyList.proxy_list(1,4,"/home/zql/workspace/New/smart_remote/lib/tasks/proxy/proxy")
|
10
10
|
p "Size: #{list.size}"
|
11
11
|
p "list: #{list}"
|
12
12
|
end
|
data/lib/get_proxy_list.rb
CHANGED
@@ -57,8 +57,7 @@ module GetProxyList
|
|
57
57
|
time_start = Time.now.to_i
|
58
58
|
begin
|
59
59
|
timeout(limit+1) do
|
60
|
-
doc = Nokogiri::HTML(open("http://www.
|
61
|
-
x = doc.css("em")
|
60
|
+
doc = Nokogiri::HTML(open("http://http://www.ikanke.cn:8080/api/herf_links/test_link",:proxy=> url)).css("body")[0].content
|
62
61
|
end
|
63
62
|
time_end = Time.now.to_i
|
64
63
|
time_use = time_end - time_start
|
@@ -76,7 +75,7 @@ module GetProxyList
|
|
76
75
|
end
|
77
76
|
time_use = -1
|
78
77
|
end
|
79
|
-
if(time_use > 0 &&time_use < limit)
|
78
|
+
if(time_use > 0 && time_use < limit&& doc == "{\"ResultMessage\":true}")
|
80
79
|
limit_list << url
|
81
80
|
end
|
82
81
|
end
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: get_proxy_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- hahazql
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-08-05 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -63,26 +68,27 @@ files:
|
|
63
68
|
homepage: ''
|
64
69
|
licenses:
|
65
70
|
- MIT
|
66
|
-
metadata: {}
|
67
71
|
post_install_message:
|
68
72
|
rdoc_options: []
|
69
73
|
require_paths:
|
70
74
|
- lib
|
71
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
72
77
|
requirements:
|
73
78
|
- - ! '>='
|
74
79
|
- !ruby/object:Gem::Version
|
75
80
|
version: '0'
|
76
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
77
83
|
requirements:
|
78
84
|
- - ! '>='
|
79
85
|
- !ruby/object:Gem::Version
|
80
86
|
version: '0'
|
81
87
|
requirements: []
|
82
88
|
rubyforge_project:
|
83
|
-
rubygems_version:
|
89
|
+
rubygems_version: 1.8.25
|
84
90
|
signing_key:
|
85
|
-
specification_version:
|
91
|
+
specification_version: 3
|
86
92
|
summary: ! '""'
|
87
93
|
test_files: []
|
88
94
|
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NjRlNzQzMzRlOTE2ZWJiY2U4Zjg3MTUwNmIzNDU1NzIwYzNmNGI1Yg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
YTE4ZTYyNGE0MGIwY2MzNzlkZDkzZDVkZTQ5YjgxMTBjNDk2NjI1MA==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MmY1MzAxN2FiYzk1OTEzNDAwOWZlYzNmMTU3NDgxNTM1MmJiMzAwNmRhMTg4
|
10
|
-
Y2NkMTY0ODFkZDZjZjJkZmU0YjFmYTE4OTA0MDNiN2EyNGFiZGY2N2YyM2Q4
|
11
|
-
MWUyNzMxODliZDJkZTUxZmQ5YTJkYjA2YjkwOGM4YjgwMDY1NGQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YzVjZmVlYjE5ZGNlYTJhM2JlMTBjZmZjNDdmNjE4MGU2ZWM4M2UwNTM4N2My
|
14
|
-
ZDRlNDU1NTMzNjg3YWUwNDNmMDk3NjAwZTgxYjVkM2UxYTFmYjdmYjhhZGYz
|
15
|
-
MDAwMTVkNWQ0MTQwODZjYjg5MGQ4NmIxYWU0Y2MyZmMxNmU3Mzk=
|