Spaces:
Sleeping
Sleeping
Update main.py
Browse files2 unmodified lines345667897 unmodified lines1718192020212223242524252627282930312 unmodified linesfrom fastapi.middleware.cors import CORSMiddleware # Importa il middleware CORSimport requests
TOKEN = "6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU"TOKEN = "6907051705:AAHZtYuiFTkQBNNw6m3cBVns8BPUw5mvxgU"BASE_URL = f"https://api.telegram.org/bot{TOKEN}"
client = httpx.AsyncClient()7 unmodified lines allow_headers=["*"],)
#https://api.telegram.org/bot6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU/setWebhook?url=https://matteoscript-TelegramBotSimple.hf.space/#https://api.telegram.org/bot6907051705:AAHZtYuiFTkQBNNw6m3cBVns8BPUw5mvxgU/setWebhook?url=https://matteoscript-TelegramBotSimple.hf.space/
@app.post("/")def webhook(data: dict): print(data) requests.get("https://telegrambot.matteoscript.workers.dev") 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