Commit e358019c by juan

aviso de telegram

1 parent 0eb94787
#!/usr/bin/python3
import requests
TOKENapi = "1783332062:AAHQIjnrsebVrs7LpIvivqgc5vaqUQSagUQ"
URL = """https://api.telegram.org/bot{}/sendMessage?chat_id={}&text={}"""
#import socket , time
#hostname=socket.gethostname()
#IPAddr=socket.gethostbyname(hostname)
#texto = "Name "+hostname+ " IP Address "+IPAddr
#test = True
#while test:
# time.sleep(30)
def Notificar(texto):
try:
url = URL.format(TOKENapi,"836078789",texto)
requests.get(url)
#test = False
except:
pass
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!