Spaces:
Sleeping
Sleeping
File size: 396 Bytes
e7ed6d7 3c2e46c 2e15741 ad93114 2e15741 691ccf0 85cc2c4 691ccf0 3c2e46c 117a0df 8edd32d 3c2e46c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from fastapi import FastAPI,Response
import requests,json
app = FastAPI()
def search(query):
resp=requests.get(f"https://www3.animeflv.net/api/animes/search?value={query}")
return resp.json()
@app.get("/")
def old():
return "u"
@app.get("/anime/{query}")
def greet_json(query,response:Response):
data=search(query);
k=[query,list(map(lambda x:x["title"],data))]
return k
|