Spaces:
Sleeping
Sleeping
Update main.py
Browse files32 unmodified lines3334353637383932 unmodified lines@app.post("/TEST")def test(data: dict):requests.get("http://api.telegram.org/bot6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU/sendMessage?chat_id=1738997897&text=Come_Stai_Vez")return {"response": "TEST"}32 unmodified lines3334353637383940414243444532 unmodified lines@app.post("/TEST")def test(data: dict):url = "http://api.telegram.org/bot6770617809:AAEhytQUOl3uZOFINVE7-o0KkIoAz8perGU/sendMessage?chat_id=1738997897&text=Come_Stai_Vez"try:response = requests.get(url)response.raise_for_status() # Controlla se la richiesta ha avuto successoprint(response.json()) # Stampa la risposta JSONexcept requests.exceptions.RequestException as e:print(f"Errore nella richiesta: {e}")return {"response": "TEST"}
main.py+7-1