import sqlite3
import os

L1A_DB_PATH = r'd:\Documents\trae_projects\yrtv\database\L1A\L1A.sqlite'

print("Checking L1A...")
if os.path.exists(L1A_DB_PATH):
    try:
        conn = sqlite3.connect(L1A_DB_PATH)
        cursor = conn.cursor()
        cursor.execute("SELECT name FROM sqlite_master WHERE type='table'")
        tables = cursor.fetchall()
        print(f"Tables: {tables}")
        
        cursor.execute("SELECT COUNT(*) FROM raw_iframe_network")
        count = cursor.fetchone()[0]
        print(f"L1A Records: {count}")
        conn.close()
    except Exception as e:
        print(f"Error checking L1A: {e}")
else:
    print(f"L1A DB not found at {L1A_DB_PATH}")
