#!/usr/bin/env python3
"""Lihat bentuk sisa 'klinik-dni' pada HTML halaman live (cache atau tautan tag)."""
import re, urllib.request

UA = {"User-Agent": "Mozilla/5.0"}
for u in ["https://www.theskincodeclinic.com/",
          "https://www.theskincodeclinic.com/perawatan-wajah-terbaik-di-sidoarjo/"]:
    t = urllib.request.urlopen(urllib.request.Request(u, headers=UA), timeout=90).read().decode("utf-8", "replace")
    print(f"\n=== {u.replace('https://www.theskincodeclinic.com', '') or '/'}")
    pola = re.findall(r".{60}klinik[-_ ]?dni.{60}", t, re.I)
    for p in pola[:8]:
        print("   ..." + re.sub(r"\s+", " ", p)[:170])
    print(f"   total kemunculan: {len(pola)}")
