Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Uptime API Edit Monitor


import requests
import pause
from datetime import datetime,timedelta,date as dtdate,time as dttime
today_=(datetime.utcnow()+timedelta(hours=5,minutes=30))
today1=datetime.combine(today_,dttime.min)+timedelta(hours=5,minutes=30)
def uptime():
if today_.hour>=9:return
pause.until(today1+timedelta(hours=9))
url = "https://api.uptimerobot.com/v2/editMonitor"
payload = "api_key=..."
headers = {
'cache-control': "no-cache",
'content-type': "application/x-www-form-urlencoded"
}
response = requests.request("POST", url, data=payload, headers=headers)
print('@',response.text)


This post first appeared on SMARTMANOJ, please read the originial post: here

Share the post

Uptime API Edit Monitor

×

Subscribe to Smartmanoj

Get updates delivered right to your inbox!

Thank you for your subscription

×