Jeremy 1 mēnesi atpakaļ
vecāks
revīzija
0f0e07d74c
5 mainītis faili ar 9 papildinājumiem un 2 dzēšanām
  1. 2 0
      .gitignore
  2. BIN
      __pycache__/toqla_auth.cpython-313.pyc
  3. 2 2
      fetch_tickets.py
  4. 4 0
      last_ticket.json
  5. 1 0
      toqla_auth.py

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+cookies.txt
+refresh_token.txt

BIN
__pycache__/toqla_auth.cpython-313.pyc


+ 2 - 2
fetch_tickets.py

@@ -47,8 +47,8 @@ LOOKBACK_DAYS      = 30    # how many days back to look for tickets on each run
 LOCAL_UTC_OFFSET   = timezone(timedelta(hours=2))  # Europe/Paris (adjust for DST if needed)
 LAST_TICKET_FILE   = "last_ticket.json"
 
-TELEGRAM_BOT_TOKEN = os.environ.get("TELEGRAM_BOT_TOKEN", "<PUT_TELEGRAM_BOT_TOKEN_HERE>")
-TELEGRAM_CHAT_ID   = os.environ.get("TELEGRAM_CHAT_ID", "<PUT_TELEGRAM_CHAT_ID_HERE>")
+TELEGRAM_BOT_TOKEN = os.environ.get("TELEGRAM_BOT_TOKEN", "5994009260:AAGPZC_fGpcQ0SjfTnyxgfiBkhbgN6xZRD4")
+TELEGRAM_CHAT_ID   = os.environ.get("TELEGRAM_CHAT_ID", "1058786961")
 
 TELEGRAM_API_URL   = "https://api.telegram.org/bot{token}/sendMessage"
 TELEGRAM_MAX_LEN   = 4096

+ 4 - 0
last_ticket.json

@@ -0,0 +1,4 @@
+{
+  "last_date": "2026-08-05T10:55:05Z",
+  "last_id": "90000000554177"
+}

+ 1 - 0
toqla_auth.py

@@ -171,6 +171,7 @@ def silent_auth_with_cookies(cookies: dict) -> str:
     #   window.parent.postMessage({type: "authorization_response", response: {code: "...", ...}}, "*")
     # or in an <input name="code" value="...">
     html = resp.text
+    print(html)
     code = None
 
     # Try to find code in postMessage JSON