proxy_seeker 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32f0b5e771e981a545f99359a43e4b25dbf7f6c0
4
- data.tar.gz: 6246b7ebd55b123db67b1894c6464f92449e5f3b
3
+ metadata.gz: 389b1b36bea1bc5670c6e59b6af96fcbfbc396f5
4
+ data.tar.gz: 86f05d1e3a4b5d6a96e7be4e258af2cf906eab72
5
5
  SHA512:
6
- metadata.gz: 362cef25b29f72fe214a92ae9dd6fc22045c30e0db19a4edb2b5d0bcb45f576476ef87c956a678feeba9c366a0ce17ab30d6451734652ac16530a03f495ff725
7
- data.tar.gz: 9ead2c81a5adcc4e21ad7fefa3f9335f649ca0107f58f4538ab0f325b0f6bf65690cce8edf120419be5d81f700f03b923dc5b49cd4a252a46fb9cd2cd87c5199
6
+ metadata.gz: f644784607c8dda9516aba4f6ec8f63dce240af264e292fa7bd35ec60cb5e5a887070535bb0c9ddcfdc60d9639ef1a2b09bcce4ee5b292e35014282383d28658
7
+ data.tar.gz: cb81221b6eefab5385b146af2045cd2cde06c38a85ab0b31241357ee1da1e096bc4c2ca162911b67972e61299f2aac96510c6f7eef5c345000964f43416cbade
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem 'httparty'
4
+ gem 'mechanize'
4
5
 
5
6
  group :development do
6
7
  gem "rdoc", "~> 3.12"
@@ -7,6 +7,8 @@ GEM
7
7
  thread_safe (~> 0.3, >= 0.3.1)
8
8
  diff-lcs (1.2.5)
9
9
  docile (1.1.5)
10
+ domain_name (0.5.22)
11
+ unf (>= 0.0.5, < 1.0.0)
10
12
  faraday (0.9.0)
11
13
  multipart-post (>= 1.2, < 3)
12
14
  git (1.2.8)
@@ -20,6 +22,8 @@ GEM
20
22
  oauth2
21
23
  hashie (3.3.2)
22
24
  highline (1.6.21)
25
+ http-cookie (1.0.2)
26
+ domain_name (~> 0.5)
23
27
  httparty (0.13.3)
24
28
  json (~> 1.8)
25
29
  multi_xml (>= 0.5.2)
@@ -34,12 +38,25 @@ GEM
34
38
  rdoc
35
39
  json (1.8.1)
36
40
  jwt (1.2.0)
41
+ mechanize (2.7.3)
42
+ domain_name (~> 0.5, >= 0.5.1)
43
+ http-cookie (~> 1.0)
44
+ mime-types (~> 2.0)
45
+ net-http-digest_auth (~> 1.1, >= 1.1.1)
46
+ net-http-persistent (~> 2.5, >= 2.5.2)
47
+ nokogiri (~> 1.4)
48
+ ntlm-http (~> 0.1, >= 0.1.1)
49
+ webrobots (>= 0.0.9, < 0.2)
50
+ mime-types (2.4.3)
37
51
  mini_portile (0.6.1)
38
52
  multi_json (1.10.1)
39
53
  multi_xml (0.5.5)
40
54
  multipart-post (2.0.0)
55
+ net-http-digest_auth (1.4)
56
+ net-http-persistent (2.9.4)
41
57
  nokogiri (1.6.5)
42
58
  mini_portile (~> 0.6.0)
59
+ ntlm-http (0.1.1)
43
60
  oauth2 (1.0.0)
44
61
  faraday (>= 0.8, < 0.10)
45
62
  jwt (~> 1.0)
@@ -64,6 +81,10 @@ GEM
64
81
  simplecov-html (~> 0.8.0)
65
82
  simplecov-html (0.8.0)
66
83
  thread_safe (0.3.4)
84
+ unf (0.1.4)
85
+ unf_ext
86
+ unf_ext (0.0.6)
87
+ webrobots (0.1.1)
67
88
 
68
89
  PLATFORMS
69
90
  ruby
@@ -72,6 +93,7 @@ DEPENDENCIES
72
93
  bundler (~> 1.0)
73
94
  httparty
74
95
  jeweler (~> 2.0.1)
96
+ mechanize
75
97
  rdoc (~> 3.12)
76
98
  rspec (~> 2.14.0)
77
99
  simplecov
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -1,8 +1,9 @@
1
1
  require 'httparty'
2
2
  require 'thread'
3
- require 'proxy_seeker/proxy'
4
- require 'proxy_seeker/fetcher'
5
- require 'proxy_seeker/tester'
3
+ require 'mechanize'
4
+ require_relative 'proxy_seeker/proxy'
5
+ require_relative 'proxy_seeker/fetcher'
6
+ require_relative 'proxy_seeker/tester'
6
7
  Dir["#{File.dirname(__FILE__)}/proxy_seeker/scrapers/*.rb"].each { |f| require f }
7
8
 
8
9
  module ProxySeeker
@@ -5,82 +5,7 @@ module ProxySeeker
5
5
  end
6
6
 
7
7
  def fetch
8
- [
9
- ::ProxySeeker::Proxy.new('54.188.223.55','60884'),
10
- ::ProxySeeker::Proxy.new('112.22.252.76','8123'),
11
- ::ProxySeeker::Proxy.new('112.142.128.147','80'),
12
- ::ProxySeeker::Proxy.new('201.234.29.11','80'),
13
- ::ProxySeeker::Proxy.new('202.158.104.195','80'),
14
- ::ProxySeeker::Proxy.new('218.92.227.165','23293'),
15
- ::ProxySeeker::Proxy.new('186.233.55.156','8080'),
16
- ::ProxySeeker::Proxy.new('113.253.151.1','8088'),
17
- ::ProxySeeker::Proxy.new('5.53.16.183','8080'),
18
- ::ProxySeeker::Proxy.new('60.206.153.177','8118'),
19
- ::ProxySeeker::Proxy.new('176.106.240.1','3128'),
20
- # ::ProxySeeker::Proxy.new('182.93.229.66','8080'),
21
- # ::ProxySeeker::Proxy.new('92.222.14.156','8080'),
22
- # ::ProxySeeker::Proxy.new('115.95.249.116','8081'),
23
- # ::ProxySeeker::Proxy.new('117.162.61.237','8123'),
24
- # ::ProxySeeker::Proxy.new('118.70.129.101','8080'),
25
- # ::ProxySeeker::Proxy.new('115.28.57.12','8080'),
26
- # ::ProxySeeker::Proxy.new('86.122.124.11','80'),
27
- # ::ProxySeeker::Proxy.new('119.147.91.21','80'),
28
- # ::ProxySeeker::Proxy.new('42.117.3.73','3128'),
29
- # ::ProxySeeker::Proxy.new('37.187.101.22','9912'),
30
- # ::ProxySeeker::Proxy.new('223.4.21.184','80'),
31
- # ::ProxySeeker::Proxy.new('161.53.25.200','21320'),
32
- # ::ProxySeeker::Proxy.new('79.142.55.19','80'),
33
- # ::ProxySeeker::Proxy.new('85.236.6.54','8081'),
34
- # ::ProxySeeker::Proxy.new('189.112.88.65','3128'),
35
- # ::ProxySeeker::Proxy.new('84.22.32.222','3128'),
36
- # ::ProxySeeker::Proxy.new('85.185.149.31','80'),
37
- # ::ProxySeeker::Proxy.new('195.74.70.249','80'),
38
- # ::ProxySeeker::Proxy.new('189.59.9.218','8080'),
39
- # ::ProxySeeker::Proxy.new('190.40.123.35','8080'),
40
- # ::ProxySeeker::Proxy.new('192.99.3.129','3128'),
41
- # ::ProxySeeker::Proxy.new('182.254.228.121','80'),
42
- # ::ProxySeeker::Proxy.new('195.154.77.104','3128'),
43
- # ::ProxySeeker::Proxy.new('122.227.42.80','3128'),
44
- # ::ProxySeeker::Proxy.new('123.30.75.115','80'),
45
- # ::ProxySeeker::Proxy.new('88.159.140.239','80'),
46
- # ::ProxySeeker::Proxy.new('93.189.221.26','8080'),
47
- # ::ProxySeeker::Proxy.new('182.93.226.14','8080'),
48
- # ::ProxySeeker::Proxy.new('165.139.149.169','3128'),
49
- # ::ProxySeeker::Proxy.new('122.180.61.107','3128'),
50
- # ::ProxySeeker::Proxy.new('113.255.114.150','8088'),
51
- # ::ProxySeeker::Proxy.new('177.128.24.75','8080'),
52
- # ::ProxySeeker::Proxy.new('85.111.25.189','8080'),
53
- # ::ProxySeeker::Proxy.new('145.118.111.106','80'),
54
- # ::ProxySeeker::Proxy.new('190.12.86.211','3128'),
55
- # ::ProxySeeker::Proxy.new('188.165.158.83','3128'),
56
- # ::ProxySeeker::Proxy.new('121.200.63.2','8080'),
57
- # ::ProxySeeker::Proxy.new('189.113.64.126','8080'),
58
- # ::ProxySeeker::Proxy.new('121.199.30.110','82'),
59
- # ::ProxySeeker::Proxy.new('116.228.55.217','8003'),
60
- # ::ProxySeeker::Proxy.new('118.97.170.74','8080'),
61
- # ::ProxySeeker::Proxy.new('120.199.252.255','8123'),
62
- # ::ProxySeeker::Proxy.new('119.6.144.70','81'),
63
- # ::ProxySeeker::Proxy.new('196.201.216.170','50'),
64
- # ::ProxySeeker::Proxy.new('211.22.11.46','444'),
65
- # ::ProxySeeker::Proxy.new('188.165.223.173','8123'),
66
- # ::ProxySeeker::Proxy.new('190.201.157.241','8080'),
67
- # ::ProxySeeker::Proxy.new('200.93.60.203','8080'),
68
- # ::ProxySeeker::Proxy.new('210.101.131.231','8080'),
69
- # ::ProxySeeker::Proxy.new('202.120.188.104','80'),
70
- # ::ProxySeeker::Proxy.new('91.121.192.178','3128'),
71
- # ::ProxySeeker::Proxy.new('180.213.2.154','1337'),
72
- # ::ProxySeeker::Proxy.new('202.96.155.251','8888'),
73
- # ::ProxySeeker::Proxy.new('196.201.216.171','16'),
74
- # ::ProxySeeker::Proxy.new('118.26.142.5','80'),
75
- # ::ProxySeeker::Proxy.new('177.207.211.250','3128'),
76
- # ::ProxySeeker::Proxy.new('115.28.85.240','8088'),
77
- # ::ProxySeeker::Proxy.new('218.90.134.138','63000'),
78
- # ::ProxySeeker::Proxy.new('41.223.119.156','3128'),
79
- # ::ProxySeeker::Proxy.new('218.71.140.134','8585'),
80
- # ::ProxySeeker::Proxy.new('203.176.182.98','8080'),
81
- # ::ProxySeeker::Proxy.new('183.62.172.50','9999'),
82
- # ::ProxySeeker::Proxy.new('62.163.131.145','80'),
83
- ]
8
+ [ ]
84
9
  end
85
10
  end
86
11
  end
@@ -1,16 +1,28 @@
1
1
  module ProxySeeker
2
2
  module Scrapers
3
3
  class ProxyListenScraper
4
- # TODO: real fetching :)
4
+ attr_reader :agent
5
5
 
6
6
  URL = 'http://www.proxy-listen.de/Proxy/Proxyliste.html'
7
7
 
8
8
  def initialize(opts = {})
9
-
9
+ @agent = Mechanize.new
10
10
  end
11
11
 
12
12
  def fetch
13
- [::ProxySeeker::Proxy.new('190.235.199.189', '3128'), ::ProxySeeker::Proxy.new('14.18.16.67','80')]
13
+ agent = Mechanize.new
14
+ page = agent.post(URL, { liststyle: 'leech', proxies: 300, submit: 'Show', type: 'http' })
15
+
16
+ key = page.forms.first.fields.first.name
17
+ value = page.forms.first.fields.first.value
18
+
19
+ page = agent.post(URL, { liststyle: 'leech', proxies: 300, submit: 'Show', type: 'http', "#{key}" => value })
20
+
21
+ list = page.parser.css('a.proxyList')
22
+
23
+ list.map{ |x| ip, port = x.text.split(':'); ::ProxySeeker::Proxy.new(ip, port) }
24
+ rescue
25
+ []
14
26
  end
15
27
  end
16
28
  end
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: proxy_seeker 1.0.0 ruby lib
5
+ # stub: proxy_seeker 1.0.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "proxy_seeker"
9
- s.version = "1.0.0"
9
+ s.version = "1.0.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -49,12 +49,14 @@ Gem::Specification.new do |s|
49
49
 
50
50
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
51
  s.add_runtime_dependency(%q<httparty>, [">= 0"])
52
+ s.add_runtime_dependency(%q<mechanize>, [">= 0"])
52
53
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
53
54
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
54
55
  s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
55
56
  s.add_development_dependency(%q<simplecov>, [">= 0"])
56
57
  else
57
58
  s.add_dependency(%q<httparty>, [">= 0"])
59
+ s.add_dependency(%q<mechanize>, [">= 0"])
58
60
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
59
61
  s.add_dependency(%q<bundler>, ["~> 1.0"])
60
62
  s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
@@ -62,6 +64,7 @@ Gem::Specification.new do |s|
62
64
  end
63
65
  else
64
66
  s.add_dependency(%q<httparty>, [">= 0"])
67
+ s.add_dependency(%q<mechanize>, [">= 0"])
65
68
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
66
69
  s.add_dependency(%q<bundler>, ["~> 1.0"])
67
70
  s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxy_seeker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Kot
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mechanize
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rdoc
29
43
  requirement: !ruby/object:Gem::Requirement