Files
iddaai-be/scripts/fetch_match_audit.py
T
fahricansecer 2f0b85a0c7
Deploy Iddaai Backend / build-and-deploy (push) Failing after 18s
first (part 2: other directories)
2026-04-16 15:11:25 +03:00

23 lines
658 B
Python
Executable File

import os
import psycopg2
from psycopg2.extras import RealDictCursor
MATCH_ID = '8yl78ecnv1fqynawwtf5159uc' # Eyüpspor vs Beşiktaş
def fetch():
try:
db_url = os.environ.get('DATABASE_URL', 'postgresql://suggestbet:SuGGesT2026SecuRe@localhost:15432/boilerplate_db')
conn = psycopg2.connect(db_url, cursor_factory=RealDictCursor)
cursor = conn.cursor()
cursor.execute("SELECT score_home, score_away FROM live_matches WHERE id = %s", (MATCH_ID,))
row = cursor.fetchone()
print(f"Match Scores: {row}")
except Exception as e:
print(e)
if __name__ == "__main__":
fetch()