Spaces:
Paused
Paused
Update app.py
Browse files1 unmodified line234556878957 unmodified lines6768697270717228 unmodified lines10110210310710410510613 unmodified lines1201211221271231241259 unmodified lines13513613714313813914017 unmodified lines15815916016716116216330 unmodified lines1941951962041971981991 unmodified linefrom fastapi.responses import JSONResponsefrom fastapi import Request, Responsefrom fastapi.templating import Jinja2Templatesimport jsonimport requestsimport canaisimport osfrom dotenv import load_dotenv
load_dotenv()57 unmodified lines "idPrefixes": ["skyflix", "tt"]}
@app_.get("/")async def home(request: Request): name = MANIFEST['name']28 unmodified lines except requests.exceptions.RequestException as e: return JSONResponse(content={"error": f"Erro ao buscar a imagem: {str(e)}"}, status_code=500)
@app_.get("/manifest.json")async def manifest(): return JSONResponse(content=MANIFEST)13 unmodified lines
return JSONResponse(content={"metas": canais_})
@app_.get("/catalog/{type}/{id}.json")async def catalog_route(request: Request, type: str, id: str): host = request.client.host9 unmodified lines else: return JSONResponse(content={"metas": []})
@app_.get("/catalog/{type}/skyflix/search={query}.json")async def search(type: str, query: str): catalog = catalog_search(query)17 unmodified lines
return JSONResponse(content={"meta": {}})
@app_.get("/stream/{type}/{id}.json")async def stream(request: Request, type: str, id: str): host = request.client.host30 unmodified lines
return JSONResponse(content={"streams": scrape_})
@app_.options("/{path:path}")async def options_handler(path: str): response = Response()app.py-8