Testing / app.py
arevedudaa's picture
Create app.py
a5f8063 verified
raw
history blame contribute delete
322 Bytes
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}