Spaces:
Sleeping
Sleeping
Commit
·
fe040d5
1
Parent(s):
17d08b9
bro
Browse files
app.py
CHANGED
|
@@ -1,7 +1,16 @@
|
|
| 1 |
-
from fastapi import FastAPI
|
|
|
|
| 2 |
|
| 3 |
app = FastAPI()
|
| 4 |
|
| 5 |
@app.get("/")
|
| 6 |
-
def
|
| 7 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI, Response
|
| 2 |
+
import requests
|
| 3 |
|
| 4 |
app = FastAPI()
|
| 5 |
|
| 6 |
@app.get("/")
|
| 7 |
+
def home():
|
| 8 |
+
return "Hello World!"
|
| 9 |
+
|
| 10 |
+
@app.get("/api/facebook/live/{id_str}")
|
| 11 |
+
def face_live(id_str: str):
|
| 12 |
+
try:
|
| 13 |
+
response = requests.get('https://www.facebook.com/video/playback/playlist.m3u8?v='+id_str).content
|
| 14 |
+
return Response(content=response)
|
| 15 |
+
except:
|
| 16 |
+
return True
|