Skip to content

Commit

Permalink
fix: Prevented the client from verifying SSL certificates. yihong0618…
Browse files Browse the repository at this point in the history
  • Loading branch information
bookfere committed Nov 8, 2023
1 parent 4650c6f commit d1e45b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ssl
import traceback

from mechanize import Browser, Request
Expand Down Expand Up @@ -157,6 +158,9 @@ def _get_api_key(self):
def get_browser(self):
br = Browser()
br.set_handle_robots(False)
# Do not verify SSL certificates
br.set_ca_data(
context=ssl._create_unverified_context(cert_reqs=ssl.CERT_NONE))

proxies = {}
if self.proxy_uri is not None:
Expand Down

0 comments on commit d1e45b0

Please sign in to comment.