Explorar o código

Back to cur.fetchall()

Foppe Hemminga %!s(int64=5) %!d(string=hai) anos
pai
achega
77b068e6a8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      cron.py

+ 2 - 1
cron.py

@@ -58,8 +58,9 @@ def cron():
     conn = sqlite3.connect(settings.db_path + '/slork.sqlite')
     conn.row_factory = sqlite3.Row
     cur = conn.cursor()
+    cur.execute(query_first)
 
-    for row in conn.execute(query_first):
+    for row in cur.fetchall():
         print(f"{row['maintainer']} - {row['api']} - {row['player']} - {row['property']}")
         url = f"https://api.torn.com/user/{row['player']}?selections=personalstats,basic&key={row['api']}"
         print(url)