Files
Brancheneinstufung2/ARCHIVE_legacy_scripts/check_benni.py
Floke d021b6b71c refactor: [30388f42] Strukturiere Root-Skripte thematisch neu
- Organisiert eine Vielzahl von Skripten aus dem Root-Verzeichnis in thematische Unterordner, um die Übersichtlichkeit zu verbessern und die Migration vorzubereiten.
- Verschiebt SuperOffice-bezogene Test- und Hilfsskripte in .
- Verschiebt Notion-bezogene Synchronisations- und Import-Skripte in .
- Archiviert eindeutig veraltete und ungenutzte Skripte in .
- Die zentralen Helfer  und  bleiben im Root, da sie von mehreren Tools als Abhängigkeit genutzt werden.
2026-03-06 10:16:08 +00:00

41 lines
1.3 KiB
Python

import sqlite3
import os
import json
DB_PATH = "companies_v3_fixed_2.db"
def check_company_33():
if not os.path.exists(DB_PATH):
print(f"❌ Database not found at {DB_PATH}")
return
try:
conn = sqlite3.connect(DB_PATH)
cursor = conn.cursor()
print(f"🔍 Checking Company ID 33 (Bennis Playland)...")
# Check standard fields
cursor.execute("SELECT id, name, city, street, zip_code FROM companies WHERE id = 33")
row = cursor.fetchone()
if row:
print(f" Standard: City='{row[2]}', Street='{row[3]}', Zip='{row[4]}'")
else:
print(" ❌ Company 33 not found in DB.")
# Check Enrichment
cursor.execute("SELECT content FROM enrichment_data WHERE company_id = 33 AND source_type = 'website_scrape'")
enrich_row = cursor.fetchone()
if enrich_row:
data = json.loads(enrich_row[0])
imp = data.get("impressum")
print(f" Impressum Data: {json.dumps(imp, indent=2) if imp else 'None'}")
else:
print(" ❌ No website_scrape found for Company 33.")
conn.close()
except Exception as e:
print(f"❌ Error: {e}")
if __name__ == "__main__":
check_company_33()