Commit 1105c7cc by 陈森彬

update 不再自动登录

parent 544c9458
Showing with 12 additions and 8 deletions
......@@ -53,14 +53,18 @@ class DGTokenCrawler(token_lib.BaseTokenCrawler):
try:
token_json = self.get_token_by_refresh_token()
if not token_json.get('access_token', ''):
dd_send_msg('digikey自动登录同步token')
resp_data = self.get_token_json()
if resp_data == False:
mgs = "digikey 刷新token失败,请手动获取"
dd_send_msg(mgs)
self.logger.error(mgs)
raise Exception(mgs)
token_json = resp_data['data']
# dd_send_msg('digikey自动登录同步token')
# resp_data = self.get_token_json()
# if resp_data == False:
# mgs = "digikey 刷新token失败,请手动获取"
# dd_send_msg(mgs)
# self.logger.error(mgs)
# raise Exception(mgs)
# token_json = resp_data['data']
mgs = "digikey 刷新token失败,请手动获取"
dd_send_msg(mgs)
self.logger.error(mgs)
raise Exception(mgs)
access_token, refresh_token = token_json['access_token'], token_json['refresh_token']
apidigikey_log.info(access_token)
apidigikey_log.info(refresh_token)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment