Skip to content

Commit

Permalink
fix ssl error
Browse files Browse the repository at this point in the history
  • Loading branch information
liufufa authored Mar 24, 2023
1 parent daffe52 commit c116f44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import requests
import json
import ssl
from chatbotv3 import Chatbot

os.environ['GPT_ENGINE'] = 'gpt-3.5-turbo'
Expand Down Expand Up @@ -133,7 +134,7 @@ def GetAccessToken():
global access_token
global expire_time
url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + str(appid) + "&secret=" + str(appsecret)
res = requests.get(url)
res = requests.get(url, verify=False)
access_token = json.loads(res.text).get('access_token')
expire_time = time.time() + 7200
print(access_token, expire_time)
Expand Down

0 comments on commit c116f44

Please sign in to comment.