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: