当前位置: 首页 > 后端技术 > Python

用Python - Requests给项目加个短信验证码注册登录,只花了3分钟

时间:2023-03-26 14:40:32 Python

使用Python-Requests在项目中添加短信验证码进行注册登录,只用了3分钟Access,代码如下,需要的可以拿来:`importrequestsurl="https://vip.veesing.com/smsApi/verifyCode"payload='appId=41KYR0EB&appKey=IIWCKKSR7NOQ&phone=1561894**&templateId=1043&variables=1234'headers={'Content-Type':'application/x-www-form-urlencoded;charset=utf-8'}response=requests.request("POST",url,headers=headers,data=payload)print(response.text.encode('utf8'))`提醒:不要忘记限制一个数字每天只请求三次为限。Python-Requests.py及文档下载