listening to local owncast now
This commit is contained in:
parent
540f9309e1
commit
1d3bce203c
10
main.py
10
main.py
|
@ -1,4 +1,5 @@
|
|||
from flask import Flask,request,json
|
||||
import requests
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
@ -14,5 +15,14 @@ def githubIssue():
|
|||
print(f'{data["issue"]["url"]} \n')
|
||||
return data
|
||||
|
||||
@app.route('/owncastWebhook',methods=['POST'])
|
||||
def owncastWebhook():
|
||||
data = request.json
|
||||
if data["type"] == "CHAT":
|
||||
print("New chat message:")
|
||||
print(f'from {data["eventData"]["user"]["displayName"]}:')
|
||||
print(f'{data["eventData"]["body"]}')
|
||||
return data
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
Loading…
Reference in New Issue