update:sms

This commit is contained in:
eric
2023-04-25 19:16:36 +08:00
parent f4803ad1c6
commit 9b57f0d19d
9 changed files with 247 additions and 0 deletions

12
smssend/tgbot.py Normal file
View File

@@ -0,0 +1,12 @@
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}'
r = requests.get(url)
# https://api.telegram.org/bot558659722:AAENA3v8gKq7R7_nsr8V58Iu-_Z6BWx2SCw/sendMessage?chat_id=-861577609&text=1234
sendTg('123python')