31 lines
777 B
Python
Executable File
31 lines
777 B
Python
Executable File
import sqlite3
|
|
conn = sqlite3.connect('/home/h3r7/turf_scraper/turf.db')
|
|
c = conn.cursor()
|
|
|
|
# Update predictions with jockey names
|
|
# From Equidia screenshot:
|
|
jockeys = {
|
|
7: "T. PICCONE",
|
|
1: "C. DEMURO",
|
|
3: "A. CRASTUS",
|
|
8: "S. PASQUIER",
|
|
11: "C. LECOUVRE",
|
|
15: "E. HARDOUIN",
|
|
16: "M. GRANDIN",
|
|
14: "A. LEMAITRE"
|
|
}
|
|
|
|
today = '2026-02-24'
|
|
for num, jockey in jockeys.items():
|
|
c.execute('UPDATE predictions SET jockey = ? WHERE date = ? AND horse_number = ?',
|
|
(jockey, today, num))
|
|
|
|
conn.commit()
|
|
print("Updated!")
|
|
|
|
c.execute('SELECT horse_number, horse_name, jockey, prediction_rank FROM predictions WHERE date = ? ORDER BY prediction_rank', (today,))
|
|
for r in c.fetchall():
|
|
print(f" {r[0]} - {r[1]} ({r[2]})")
|
|
|
|
conn.close()
|