Skip to content

Commit

Permalink
Fix SSL error
Browse files Browse the repository at this point in the history
  • Loading branch information
specialpointcentral committed Dec 5, 2020
1 parent eef4832 commit 4ea2d0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def login(s: requests.Session, username, password):
"username": username,
"password": password
}
r = s.post("https://app.ucas.ac.cn/uc/wap/login/check", data=payload)
r = s.post("https://app.ucas.ac.cn/uc/wap/login/check", data=payload, verify=False)

# print(r.text)
if r.json().get('m') != "操作成功":
Expand All @@ -39,7 +39,7 @@ def login(s: requests.Session, username, password):


def get_daily(s: requests.Session):
daily = s.get("https://app.ucas.ac.cn/ncov/api/default/daily?xgh=0&app_id=ucas")
daily = s.get("https://app.ucas.ac.cn/ncov/api/default/daily?xgh=0&app_id=ucas", verify=False)
# info = s.get("https://app.ucas.ac.cn/ncov/api/default/index?xgh=0&app_id=ucas")
j = daily.json()
d = j.get('d', None)
Expand Down Expand Up @@ -96,7 +96,7 @@ def submit(s: requests.Session, old: dict):
'gtshcyjkzt': old['gtshcyjkzt'],
'app_id': 'ucas'}

r = s.post("https://app.ucas.ac.cn/ncov/api/default/save", data=new_daily)
r = s.post("https://app.ucas.ac.cn/ncov/api/default/save", data=new_daily, verify=False)

if debug:
from urllib.parse import parse_qs, unquote
Expand Down

0 comments on commit 4ea2d0e

Please sign in to comment.