Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion weixin/mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down