phantom_proxy 1.3.0 → 1.3.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd51c0e6b7b7b624070759913a14f094fec43a9c
|
4
|
+
data.tar.gz: 0c4fea61eefd285db91c29057d937532e34dabbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b9db1c9de242698bab6758a18c30bff9f3f34359adf5ac27745d3f5bba14ab77d69c77d96ee8ae3896cbac4ad10a6c34e1113bb4ad23b3d3a6ed9ec0587d2a8
|
7
|
+
data.tar.gz: 5c8e96f3e2d87646cb6719e1698ff24b4685b4df8dc953be01311f712b916a51c1a82a0e262ba69bcdd836e3529767c9c05292f65ecff99418da5749ef9aaf95
|
data/bin/phantom_proxy
CHANGED
@@ -30,7 +30,7 @@ module PhantomProxy
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
PhantomProxy.logger = Logger.new(options[:log_file]) if options[:log_file]
|
33
|
-
PhantomProxy.hmac_key = options[:hmac_key] if options[:hmac_key]
|
33
|
+
PhantomProxy.hmac_key = options[:hmac_key] if options[:hmac_key] && options[:hmac_key] != "none"
|
34
34
|
remaining
|
35
35
|
end
|
36
36
|
def self.run_phantom_proxy(args)
|
@@ -45,7 +45,7 @@ module PhantomProxy
|
|
45
45
|
|
46
46
|
@dom = invokePhantomJS(PhantomProxy.script_path, [picture, loadFrames, "\""+url+"\"", url_args_.length, url_args])
|
47
47
|
|
48
|
-
logger.info("Opened page: "+ /Open page: (.*?) END/.match(@dom)[1])
|
48
|
+
#logger.info("Opened page: "+ /Open page: (.*?) END/.match(@dom)[1])
|
49
49
|
|
50
50
|
@ready = 503
|
51
51
|
dom_text = "Failed to load page"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module PhantomProxy
|
2
2
|
class ProxyApi < AppRouterBase
|
3
|
+
get "/favicon.ico", :next_api
|
3
4
|
get "/*path", :handle_proxy_request
|
4
5
|
get "/", :handle_proxy_request
|
5
6
|
|
@@ -28,7 +29,11 @@ module PhantomProxy
|
|
28
29
|
end
|
29
30
|
|
30
31
|
def host
|
31
|
-
|
32
|
+
if https?
|
33
|
+
env['SERVER_NAME']
|
34
|
+
else
|
35
|
+
env['HTTP_HOST']
|
36
|
+
end
|
32
37
|
end
|
33
38
|
|
34
39
|
def path
|
@@ -118,12 +118,12 @@ function main() {
|
|
118
118
|
phantom.exit();
|
119
119
|
}, function(page) {
|
120
120
|
//page.customHeaders = {"Referer": "http://uk-amazon.icims.com/jobs/240290/account-representative---amazon-web-services---iberia/job"}
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
121
|
+
page.onResourceReceived = function (response) {
|
122
|
+
if (response.stage == "end" && response.url == address && response.status != 200)
|
123
|
+
{
|
124
|
+
console.log('URL_ERROR_CODE: '+response.status+'URL_ERROR_CODE_END');
|
125
|
+
}
|
126
|
+
};
|
127
127
|
});
|
128
128
|
}
|
129
129
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phantom_proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suddani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08
|
11
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|