Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from fastapi.responses import JSONResponse
|
|
|
|
| 3 |
|
| 4 |
app = FastAPI()
|
| 5 |
|
|
@@ -10,4 +11,9 @@ def read_root():
|
|
| 10 |
|
| 11 |
@app.get("/json")
|
| 12 |
def read_json():
|
| 13 |
-
return JSONResponse(content={"Hello": "World!"})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from fastapi.responses import JSONResponse
|
| 3 |
+
from fetchYoutubeSubtitle import fetchYoutubeSubtitle
|
| 4 |
|
| 5 |
app = FastAPI()
|
| 6 |
|
|
|
|
| 11 |
|
| 12 |
@app.get("/json")
|
| 13 |
def read_json():
|
| 14 |
+
return JSONResponse(content={"Hello": "World!"})
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
@app.get("/subtitle/")
|
| 18 |
+
def get_subtitle(vid: string):
|
| 19 |
+
return fetchYoutubeSubtitle(vid)
|