import urllib.request, ssl, re

ctx = ssl.create_default_context(); ctx.check_hostname=False; ctx.verify_mode=ssl.CERT_NONE

def get(url):
    try:
        r = urllib.request.urlopen(url, timeout=6, context=ctx)
        return r.status, r.read(10000).decode(errors='ignore')
    except Exception as ex: return 0, str(ex)[:200]

# Get the actual index.html content (longer)
s, body = get('http://192.168.1.1/webpages/index.html')
print("BODY:", repr(body[:2000]))
