cambiado hek por ipinfo.io
This commit is contained in:
7
init.py
7
init.py
@@ -1,11 +1,10 @@
|
||||
import hek
|
||||
from os.path import exists
|
||||
import requests
|
||||
from time import sleep
|
||||
|
||||
while True:
|
||||
# get ip
|
||||
ip = hek.ipstuff.myip(find="query")
|
||||
req = requests.get("http://ipinfo.io/ip")
|
||||
ip = req.text
|
||||
|
||||
# existe archivo con la antigua ip
|
||||
file_exists = exists("old_ip.txt")
|
||||
@@ -29,4 +28,4 @@ while True:
|
||||
"CQhKyt_TA5uoaJhC_XE/sendMessage?chat_id=3058130&text="
|
||||
"La nueva Ip para su Raspberry es: " + ip
|
||||
)
|
||||
sleep(5*60)
|
||||
sleep(5 * 60)
|
||||
|
||||
Reference in New Issue
Block a user