Spaces:
Paused
Paused
File size: 322 Bytes
a5f8063 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from fastapi import FastAPI
from headless_browser import run_headless_browser
app = FastAPI()
@app.get("/")
def home():
return {"message": "Chromium Headless Browser API is Running!"}
@app.get("/fetch-title/")
def fetch_title(url: str):
title = run_headless_browser(url)
return {"url": url, "title": title}
|