From 92b44f23f64d77012614c282e2b9b0a8abe49ca9 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 7 Jun 2024 12:51:38 +0800 Subject: [PATCH] fix --- HinetPy/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HinetPy/client.py b/HinetPy/client.py index de6f0539..244f3f5e 100644 --- a/HinetPy/client.py +++ b/HinetPy/client.py @@ -15,6 +15,7 @@ from html.parser import HTMLParser from multiprocessing.pool import ThreadPool +import certifi import requests from requests.adapters import HTTPAdapter from urllib3 import PoolManager @@ -184,7 +185,9 @@ def login(self, user, password): self.session = requests.Session() self.session.mount(self._HINET, AddedCipherAdapter()) self.session.mount(self._AUTH, AddedCipherAdapter()) - self.session.get(self._AUTH, timeout=self.timeout) # get cookie + self.session.get( + self._AUTH, timeout=self.timeout, verify=certifi.where() + ) # get cookie resp = self.session.post( self._AUTH, data={"auth_un": self.user, "auth_pw": self.password},