From 391f748d33364621c57b2343fd236235b8d61695 Mon Sep 17 00:00:00 2001 From: 0c0c0f <0xwindows@gmail.com> Date: Mon, 4 Sep 2017 22:16:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hack_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack_requests.py b/hack_requests.py index 7371c95..df00cb3 100644 --- a/hack_requests.py +++ b/hack_requests.py @@ -15,7 +15,7 @@ class HackRequests(object): def __init__(self, request_info, lib = 'REQUESTS'): self.request_info = request_info self.lib = lib - self.url = "{}://{}{}".format(self.request_info['protocol'], self.request_info['host'], self.request_info['path']) + self.url = "{}://{}:{}{}".format(self.request_info['protocol'], self.request_info['host'],self.request_info['port'], self.request_info['path']) self.TIME_OUT = 10 # timeout of requests # configurations for PhantomJS From bb414cf4cef2de2c9d03c4f5ef59b6c43883c9ad Mon Sep 17 00:00:00 2001 From: 0c0c0f <892850447@qq.com> Date: Mon, 4 Sep 2017 22:17:48 +0800 Subject: [PATCH 2/2] Update hack_requests.py --- hack_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack_requests.py b/hack_requests.py index df00cb3..5362b4d 100644 --- a/hack_requests.py +++ b/hack_requests.py @@ -15,7 +15,7 @@ class HackRequests(object): def __init__(self, request_info, lib = 'REQUESTS'): self.request_info = request_info self.lib = lib - self.url = "{}://{}:{}{}".format(self.request_info['protocol'], self.request_info['host'],self.request_info['port'], self.request_info['path']) + self.url = "{}://{}:{}{}".format(self.request_info['protocol'], self.request_info['host'], self.request_info['port'], self.request_info['path']) self.TIME_OUT = 10 # timeout of requests # configurations for PhantomJS