Fix: raise exception in get html

catching exception won't work in methods, eg javbus
This commit is contained in:
Mathhew
2021-11-25 09:26:15 +08:00
parent 433eafb6c8
commit 0fcb11be35

View File

@@ -52,12 +52,13 @@ def get_html(url, cookies: dict = None, ua: str = None, return_type: str = None,
return result.text
except requests.exceptions.ProxyError:
print("[-]Proxy error! Please check your Proxy")
return
raise requests.exceptions.ProxyError
except Exception as e:
print("[-]Connect retry {}/{}".format(i + 1, configProxy.retry))
errors = str(e)
print('[-]Connect Failed! Please check your Proxy or Network!')
print("[-]" + errors)
raise Exception('Connect Failed')
def post_html(url: str, query: dict, headers: dict = None) -> requests.Response: