import sqlite3, sys
sys.stdout.reconfigure(encoding="utf-8")

db = r"C:\Users\Admin\AppData\Local\Google\Chrome\User Data\Profile 5\History"
try:
    conn = sqlite3.connect(f"file:{db}?mode=ro", uri=True)
    cur = conn.cursor()
    cur.execute("SELECT url, title, last_visit_time FROM urls WHERE url LIKE '%muse%' ORDER BY last_visit_time DESC LIMIT 20")
    rows = cur.fetchall()
    print(f"Found {len(rows)} matching URLs in Profile 5 History:")
    for r in rows:
        print(f"  • {r[0]} | Title: {r[1]}")
    conn.close()
except Exception as e:
    print(f"Error: {e}")
