Spiel77 und Super6 hinzugefügt
This commit is contained in:
parent
f3d6b2961f
commit
b493410612
1 changed files with 16 additions and 3 deletions
19
lotto2py.py
19
lotto2py.py
|
|
@ -19,8 +19,9 @@ text = soup.get_text(separator="\n")
|
|||
|
||||
# Lottozahlen: 6 aus 49, Zusatzzahl und Superzahl
|
||||
lottozahlen = []
|
||||
zusatzzahl = None
|
||||
superzahl = None
|
||||
spiel77 = []
|
||||
super6 = []
|
||||
|
||||
# Regex: Hauptzahlen finden (z. B. Zeile enthält "11 20 28 30 35 41")
|
||||
match_haupt = re.search(r"\s(\d{1,2}(?:\s+\d{1,2}){5})\s", text)
|
||||
|
|
@ -32,7 +33,19 @@ match_super = re.search(r"Superzahl[^0-9]*([0-9]{1,2})", text)
|
|||
if match_super:
|
||||
superzahl = int(match_super.group(1))
|
||||
|
||||
# Ausgabe der Variablen
|
||||
# Spiel 77 suchen (genau 7 Ziffern)
|
||||
match_spiel77 = re.search(r"Spiel\s*77[^0-9]*((?:\d\s*){7})", text)
|
||||
if match_spiel77:
|
||||
#spiel77 = match_spiel77.group(1)
|
||||
spiel77 = [int(n) for n in match_spiel77.group(1).split()]
|
||||
# Super 6 suchen (genau 6 Ziffern)
|
||||
match_super6 = re.search(r"Super\s*6[^0-9]*((?:\d\s*){6})", text)
|
||||
if match_super6:
|
||||
#super6 = match_super6.group(1)
|
||||
super6 = [int(n) for n in match_super6.group(1).split()]
|
||||
|
||||
# Ausgabe
|
||||
print("Gezogene Lottozahlen (6 aus 49):", lottozahlen)
|
||||
print("Superzahl:", superzahl)
|
||||
# ARD-Teletext führt in 581 keine Zusatzzahl auf – ggf. gleichen Ablauf auf Seite 582 (Mittwoch).
|
||||
print("Spiel 77:", spiel77)
|
||||
print("Super 6 :", super6)
|
||||
Loading…
Add table
Add a link
Reference in a new issue