feat: 短信验证码

This commit is contained in:
eric
2023-05-04 13:14:11 +08:00
parent 05bebda577
commit 84dabf9198
7 changed files with 246 additions and 0 deletions

16
tgMesaage.py Normal file
View File

@@ -0,0 +1,16 @@
import time
import requests
# bot发消息到tg群组
def sendTg(message):
baseUrl="https://api.telegram.org/bot"
toekn="558659722:AAENA3v8gKq7R7_nsr8V58Iu-_Z6BWx2SCw"
chat_id="-861577609"
text=message
url=f'{baseUrl}{toekn}/sendMessage?chat_id={chat_id}&text={text}'
try:
r = requests.get(url)
except:
print('请检查网络代理')
# https://api.telegram.org/bot558659722:AAENA3v8gKq7R7_nsr8V58Iu-_Z6BWx2SCw/sendMessage?chat_id=-861577609&text=1234