Spaces:
Sleeping
Sleeping
Update main.py
Browse files2 unmodified lines34567897 unmodified lines1718192021222324252627282 unmodified linesfrom fastapi.middleware.cors import CORSMiddleware # Importa il middleware CORSimport requestsTOKEN = "6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU"BASE_URL = f"https://api.telegram.org/bot{TOKEN}"client = httpx.AsyncClient()7 unmodified linesallow_headers=["*"],)#https://api.telegram.org/bot6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU/setWebhook?url=https://matteoscript-TelegramBotSimple.hf.space/@app.post("/")def webhook(data: dict):print(data)requests.get("https://telegrambot.matteoscript.workers.dev")#await client.get("https://script.google.com/macros/s/AKfycbxa8wXSr1ynlEONQ99s3WF5a9OTHSYWH7NkKsYI9Z2SeWRoU5c0-WzjY5Gn2iDhSgj5/exec")#requests.get("https://script.google.com/macros/s/AKfycbxa8wXSr1ynlEONQ99s3WF5a9OTHSYWH7NkKsYI9Z2SeWRoU5c0-WzjY5Gn2iDhSgj5/exec")#requests.get("http://api.telegram.org/bot6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU/sendMessage?chat_id=1738997897&text=Come_Stai_Vez")2 unmodified lines34567897 unmodified lines1718192021222324252627282930312 unmodified linesfrom fastapi.middleware.cors import CORSMiddleware # Importa il middleware CORSimport requestsTOKEN = "6907051705:AAHZtYuiFTkQBNNw6m3cBVns8BPUw5mvxgU"BASE_URL = f"https://api.telegram.org/bot{TOKEN}"client = httpx.AsyncClient()7 unmodified linesallow_headers=["*"],)#https://api.telegram.org/bot6907051705:AAHZtYuiFTkQBNNw6m3cBVns8BPUw5mvxgU/setWebhook?url=https://matteoscript-TelegramBotSimple.hf.space/@app.post("/")def webhook(data: dict):print('data)print(f"\n{datetime.now()}: INIZIO")time.sleep(20)print(f"\n{datetime.now()}: FINE")requests.get("https://script.google.com/macros/s/AKfycbxa8wXSr1ynlEONQ99s3WF5a9OTHSYWH7NkKsYI9Z2SeWRoU5c0-WzjY5Gn2iDhSgj5/exec")#await client.get("https://script.google.com/macros/s/AKfycbxa8wXSr1ynlEONQ99s3WF5a9OTHSYWH7NkKsYI9Z2SeWRoU5c0-WzjY5Gn2iDhSgj5/exec")#requests.get("https://script.google.com/macros/s/AKfycbxa8wXSr1ynlEONQ99s3WF5a9OTHSYWH7NkKsYI9Z2SeWRoU5c0-WzjY5Gn2iDhSgj5/exec")#requests.get("http://api.telegram.org/bot6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU/sendMessage?chat_id=1738997897&text=Come_Stai_Vez")
main.py+7-4