diff --git a/run.py b/run.py index 3485be8..c0509ba 100644 --- a/run.py +++ b/run.py @@ -10,14 +10,16 @@ ip = requests.get("https://api.ipify.org").text if ip != last_ip: response = requests.post("https://proxy.webshare.io/api/proxy/config/", - json={"authorized_ips": [ip]}, - headers={"Authorization": apikey}) + json={"authorized_ips": [ip]}, + headers={"Authorization": apikey}) if response.status_code == 200: if response.json()["authorized_ips"][0] == ip: logging.warning("Successfully updated ip to: " + ip) else: - logging.warning("Ip didn't update to " + ip + " for some reason") + logging.warning("Ip didn't update to " + ip + + " for some reason") else: - logging.warning("Received " + response.status_code + " error while updating ip to: " + ip) + logging.warning("Received " + response.status_code + + " error while updating ip to: " + ip) last_ip = ip - time.sleep(delay) \ No newline at end of file + time.sleep(delay)