File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def req_to_urlinfo(req):
91
91
url_info ["ssl" ] = True
92
92
url_info ["base_url" ] = "https://{0}" .format (url_info ["host" ])
93
93
if ":" not in url_info ["host" ]:
94
- url_info ["port" ] = url_info [ " 443" ]
94
+ url_info ["port" ] = 443
95
95
else :
96
96
url_info ["ssl" ] = False
97
97
url_info ["base_url" ] = "http://{0}" .format (url_info ["host" ])
@@ -193,9 +193,10 @@ def rsp_to_req_dict(response):
193
193
def get_res_req_by_url (url ):
194
194
headers = dict ()
195
195
headers ["User-Agent" ] = Utils .get_random_ua ()
196
+ headers ["Connection" ] = "close"
196
197
try :
197
198
response = requests .get (url ,headers = headers ,timeout = 10 )
198
199
return HTTPParser .rsp_to_dict (response ), HTTPParser .rsp_to_req_dict (response )
199
200
except :
200
201
logger .debug (traceback .format_exc ())
201
- return None , None
202
+ return None , None
You can’t perform that action at this time.
0 commit comments