This project is a FastAPI-based web application that validates and fetches information about a given URL.
- Accepts a URL as input.
- Validates the URL's accessibility.
- Extracts the title of the webpage.
- Python 3.10+
- FastAPI
- httpx
- BeautifulSoup4
- Clone the repository:
git clone https://github.com/koumadev/fuseex1.git
- Navigate to the project directory:
cd fuseex1 - Install dependencies:
pip install -r requirements.txt
- Start the FastAPI server:
uvicorn main:app --reload
- Open Postman or a browser and test the endpoint:
- Endpoint:
POST /validate-url/ - Request Body:
{ "url": "https://example.com" }
- Endpoint:
{
"url": "https://example.com",
"status_code": 200,
"title": "Example Domain"
}This project is licensed under the MIT License.