From 6c0261ab83fc4f8df36fc6539ed993e9d7c164e3 Mon Sep 17 00:00:00 2001 From: lingcell/fangge <32589671+lo106258@users.noreply.github.com> Date: Thu, 1 Sep 2022 12:00:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0requests=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weixin/mp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weixin/mp.py b/weixin/mp.py index caf4aa5..c62a600 100644 --- a/weixin/mp.py +++ b/weixin/mp.py @@ -54,7 +54,7 @@ def get_access_token(mp): api_uri = "https://api.weixin.qq.com" - def __init__(self, app_id, app_secret, ac_path=None, jt_path=None, ac_callback=None, jt_callback=None): + def __init__(self, app_id, app_secret, ac_path=None, jt_path=None, ac_callback=None, jt_callback=None, proxies=None): """ :param :app_id 微信app id :param :app_secret 微信app secret @@ -66,6 +66,7 @@ def __init__(self, app_id, app_secret, ac_path=None, jt_path=None, ac_callback=N self.app_id = app_id self.app_secret = app_secret self.session = requests.Session() + self.session.proxies = proxies if ac_path is None: ac_path = os.path.join(DEFAULT_DIR, ".access_token") if jt_path is None: