...
This commit is contained in:
parent
ae67ff31c2
commit
c21cb0bdfd
2 changed files with 41 additions and 2 deletions
|
|
@ -91,6 +91,9 @@ if 'Samstag,' in datum:
|
||||||
resp = cursor.execute(sql_q)
|
resp = cursor.execute(sql_q)
|
||||||
if resp == 0:
|
if resp == 0:
|
||||||
cursor.execute(sql)
|
cursor.execute(sql)
|
||||||
|
connection.commit()
|
||||||
|
cursor.close()
|
||||||
|
connection.close()
|
||||||
|
|
||||||
if 'Mittwoch,' in datum:
|
if 'Mittwoch,' in datum:
|
||||||
sql = "INSERT INTO `mittwoch`(`datum`, `z1`, `z2`, `z3`, `z4`, `z5`, `z6`, `sz`, `super6`, `spiel77`) VALUES" \
|
sql = "INSERT INTO `mittwoch`(`datum`, `z1`, `z2`, `z3`, `z4`, `z5`, `z6`, `sz`, `super6`, `spiel77`) VALUES" \
|
||||||
|
|
|
||||||
40
lotto2py.py
40
lotto2py.py
|
|
@ -193,21 +193,57 @@ def SQLfreitag(data):
|
||||||
resp = cursor.execute(sql_q)
|
resp = cursor.execute(sql_q)
|
||||||
if resp == 0:
|
if resp == 0:
|
||||||
cursor.execute(sql)
|
cursor.execute(sql)
|
||||||
print(resp)
|
|
||||||
|
connection.commit()
|
||||||
|
cursor.close()
|
||||||
|
connection.close()
|
||||||
|
def SQLsamstag(data):
|
||||||
|
connection = pymysql.connect(db="hubobel",
|
||||||
|
user="hubobel",
|
||||||
|
passwd="polier2003",
|
||||||
|
host='10.0.1.123', charset='utf8')
|
||||||
|
cursor = connection.cursor()
|
||||||
|
sql = "INSERT INTO `samstag`(`datum`, `z1`, `z2`, `z3`, `z4`, `z5`, `z6`, `sz`, `super6`, `spiel77`) VALUES" \
|
||||||
|
" ('" + str(data['Datum']) + "','" + str(data['Z1']) + "','" + str(data['Z2']) + "','" + str(data['Z3']) + \
|
||||||
|
"','" + str(data['Z4']) + "','" + str(data['Z5']) + "','" + str(data['Z6']) + "','" + str(data['Superzahl']) + \
|
||||||
|
"','" + str(data['Super6']) + "','" + str(data['Spiel77']) + "')"
|
||||||
|
sql_q = "SELECT * FROM samstag WHERE datum like '%" + data['Datum'] + "%'"
|
||||||
|
resp = cursor.execute(sql_q)
|
||||||
|
if resp == 0:
|
||||||
|
cursor.execute(sql)
|
||||||
|
connection.commit()
|
||||||
|
cursor.close()
|
||||||
|
connection.close()
|
||||||
|
def SQLmittwoch(data):
|
||||||
|
connection = pymysql.connect(db="hubobel",
|
||||||
|
user="hubobel",
|
||||||
|
passwd="polier2003",
|
||||||
|
host='10.0.1.123', charset='utf8')
|
||||||
|
cursor = connection.cursor()
|
||||||
|
sql = "INSERT INTO `mittwoch`(`datum`, `z1`, `z2`, `z3`, `z4`, `z5`, `z6`, `sz`, `super6`, `spiel77`) VALUES" \
|
||||||
|
" ('" + str(data['Datum']) + "','" + str(data['Z1']) + "','" + str(data['Z2']) + "','" + str(data['Z3']) + \
|
||||||
|
"','" + str(data['Z4']) + "','" + str(data['Z5']) + "','" + str(data['Z6']) + "','" + str(data['Superzahl']) + \
|
||||||
|
"','" + str(data['Super6']) + "','" + str(data['Spiel77']) + "')"
|
||||||
|
sql_q = "SELECT * FROM samstag WHERE datum like '%" + data['Datum'] + "%'"
|
||||||
|
resp = cursor.execute(sql_q)
|
||||||
|
if resp == 0:
|
||||||
|
cursor.execute(sql)
|
||||||
connection.commit()
|
connection.commit()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
wochentag = datetime.today().weekday()
|
wochentag = datetime.today().weekday()
|
||||||
wochentag = 1
|
wochentag = 2
|
||||||
|
|
||||||
if wochentag == 2:
|
if wochentag == 2:
|
||||||
Zahl = Normalziehung(582)
|
Zahl = Normalziehung(582)
|
||||||
SQLnorm(Zahl)
|
SQLnorm(Zahl)
|
||||||
|
SQLmittwoch(Zahl)
|
||||||
notify_telegram(str(Zahl))
|
notify_telegram(str(Zahl))
|
||||||
elif wochentag == 5:
|
elif wochentag == 5:
|
||||||
Zahl = Normalziehung(581)
|
Zahl = Normalziehung(581)
|
||||||
SQLnorm(Zahl)
|
SQLnorm(Zahl)
|
||||||
|
SQLsamstag(Zahl)
|
||||||
notify_telegram(str(Zahl))
|
notify_telegram(str(Zahl))
|
||||||
elif wochentag == 1:
|
elif wochentag == 1:
|
||||||
Zahl = Euro()
|
Zahl = Euro()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue