lanbogao commited on
Commit
56f750d
1 Parent(s): 2d7a999

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -1
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)