05/23 Update new games data
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
"Bash(python -m pytest tests/test_backup.py -v)",
|
||||
"Bash(python -m pytest --tb=short -q)",
|
||||
"Bash(python -m pytest tests/test_wheeling.py -v)",
|
||||
"WebFetch(domain:www.valottery.com)"
|
||||
"WebFetch(domain:www.valottery.com)",
|
||||
"Bash(pip install *)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+19
-3
@@ -280,17 +280,33 @@ def _fetch_va_lottery(game_name: str, source: str, url: str) -> dict:
|
||||
continue
|
||||
|
||||
try:
|
||||
numbers = [int(n.strip()) for n in parts[1].split(",") if n.strip()]
|
||||
p1 = parts[1].strip()
|
||||
p1_lower = p1.lower()
|
||||
if p1_lower.startswith("day:"):
|
||||
# Old twice-daily format: "Day: N1,...; Night: N1,..."
|
||||
# Use Night draw only for consistency with modern single-draw records
|
||||
if len(parts) >= 3 and "night:" in parts[2].lower():
|
||||
night_str = parts[2][parts[2].lower().find("night:") + 6:]
|
||||
numbers = [int(n.strip()) for n in night_str.split(",") if n.strip()]
|
||||
else:
|
||||
continue
|
||||
elif p1_lower.startswith("night:"):
|
||||
# Night-only historical record
|
||||
numbers = [int(n.strip()) for n in p1[p1_lower.find("night:") + 6:].split(",") if n.strip()]
|
||||
else:
|
||||
numbers = [int(n.strip()) for n in p1.split(",") if n.strip()]
|
||||
except ValueError as e:
|
||||
logger.warning("[FETCH] VA %s parse error %r: %s", source, line, e)
|
||||
continue
|
||||
|
||||
bonus = None
|
||||
if len(parts) >= 3:
|
||||
colon = parts[2].rfind(":")
|
||||
p_last = parts[-1].strip()
|
||||
if "night:" not in p_last.lower() and "day:" not in p_last.lower():
|
||||
colon = p_last.rfind(":")
|
||||
if colon >= 0:
|
||||
try:
|
||||
bonus = int(parts[2][colon + 1:].strip())
|
||||
bonus = int(p_last[colon + 1:].strip())
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
|
||||
Binary file not shown.
@@ -12,6 +12,12 @@ import threading
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
|
||||
try:
|
||||
import truststore
|
||||
truststore.inject_into_ssl()
|
||||
except Exception:
|
||||
pass # not installed or not needed on this platform
|
||||
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
|
||||
from db.database import init_db
|
||||
|
||||
@@ -4,3 +4,4 @@ numpy>=1.26.0
|
||||
matplotlib>=3.8.0
|
||||
openpyxl>=3.1.0
|
||||
APScheduler>=3.10.0
|
||||
truststore>=0.9.0
|
||||
|
||||
Reference in New Issue
Block a user