hackhttp icon indicating copy to clipboard operation
hackhttp copied to clipboard

ssl.SSLError: ('The read operation timed out',)

Open intAV opened this issue 5 years ago • 2 comments

ssl.SSLError: ('The read operation timed out',) 设置超时在哪里设置呢

intAV avatar Apr 23 '19 08:04 intAV

默认超时时间 10 秒, 你可以自己初始化一个 httpconpool 对象,在这里设置最大连接池和超时时间:

import hackhttp
myconpool = hackhttp.httpconpool(maxconnectpool=20, timeout=30)
hh = hackhttp.hackhttp(conpool=myconpool)
url = "http://www.bugscan.net"
code, head, html, redirect_url, log = hh.http(url)

Medicean avatar Apr 23 '19 10:04 Medicean

谢谢表哥

intAV avatar Apr 23 '19 10:04 intAV