MarkusMail 8 Posted February 20, 2023 Share Posted February 20, 2023 Ich versuche Webhooks zu verwenden. Aber leider bekomme ich kein Ergebnis von Emby. Hier habe ich einen Webhook in Python geschrieben. Aber leider bekomme ich keine Daten von Emby! from flask import Flask, request app = Flask(__name__) @app.route('/webhook', methods=['POST']) def handle_webhook(): print("") print("RUN") data = request.json # json-Daten aus Anfrage auslesen # Hier können Sie die Aktionen ausführen, die auf den Webhook folgen sollen print("...") print(data) print("...") return '', 200 # Antwort an den Sender senden if __name__ == '__main__': app.run(port=5500) # Anwendung starten Wenn ich mit diesem Skript Poste, dann bekomme ich die Daten vom Skript. Warum klappt das nicht mit Emby? import requests import json data = {'name': 'John', 'age': 30} # Beispiel-Daten headers = {'Content-type': 'application/json'} # Header setzen r = requests.post('http://127.0.0.1:5500/webhook', data=json.dumps(data), headers=headers) print(r.status_code) # HTTP-Statuscode der Antwort Hiermit bekomme ich das ausgegeben! RUN ... {'name': 'John', 'age': 30} ... Aber mit Emby bekomme ich nur RUN Wäre echt Spitze wenn da jemand Ahnung hat und mir helfen kann. Danke! sudo apt-get update && sudo apt-get upgrade -y sudo pip install flask requests :: Raspberry 1 Link to comment Share on other sites More sharing options...
Luke 37050 Posted February 20, 2023 Share Posted February 20, 2023 Hi, how did you configure webhooks in Emby Server? Link to comment Share on other sites More sharing options...
MarkusMail 8 Posted February 20, 2023 Author Share Posted February 20, 2023 (edited) Edited February 20, 2023 by MarkusMail Link to comment Share on other sites More sharing options...
Luke 37050 Posted February 20, 2023 Share Posted February 20, 2023 Can you please attach the image here as a jpg? Thanks. Link to comment Share on other sites More sharing options...
Luke 37050 Posted February 21, 2023 Share Posted February 21, 2023 How did you configure the options for that webhook? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now