某朴超市利用flask在线获取refreshtoken
朴朴的微信开发ID为wx86233b2f41212f34,bundleID为com.pupumall.customer,通过构建Url
从response中匹配到uuid,将二维码地址返回给前端
扫码后,前端点击按钮触发下一步骤
通过uuid辨别用户
后端再进行访问
https://long.open.weixin.qq.com/connect/l/qrconnect?uuid={uuid}&f=url
如果状态码为200再进行正则匹配'window.wx_errcode=(.*?);', res.text)[0],如果返回值为405就再次进行匹配code'\?code=(.*?)&state=', res.text)[0]
将匹配到的结果构建Json
1 | jsondata = { |
某朴的登录api为https://cauth.pupuapi.com/clientauth/user/society/wechat/login?user_society_type=11
Post请求后将结果返回给前端
前端自行提取refresh_token字段
- Title: 某朴超市利用flask在线获取refreshtoken
- Author: Dingdong
- Created at : 2024-07-22 03:14:26
- Updated at : 2024-07-23 14:45:42
- Link: https://www.dp0.cc/2024/07/22/某朴超市利用flask在线获取refreshtoken/
- License: This work is licensed under CC BY-NC-SA 4.0.