Oct-28-2020, 02:30 PM
I know one of code is works great as:
But I would like to use local like 192.168.1.1 WITHOUT the internet, how can I code this? url="192.168.1.1" ?
try: import httplib except: import http.client as httplib def checkInternetHttplib(url="www.google.com", timeout=3): conn = httplib.HTTPConnection(url, timeout=timeout) try: conn.request("HEAD", "/") conn.close() return True except Exception as e: print(e) return FalseThat is use the internet...
But I would like to use local like 192.168.1.1 WITHOUT the internet, how can I code this? url="192.168.1.1" ?