Website scraping with fastApi
Before setting up the project locally, ensure that you have the following installed:
- Python (version 3.7 or higher)
- pip (Python package installer)
Follow these steps to set up the project on your local machine:
- Clone the repository:
git clone https://github.com/Ankitcode99/scrapy.git
- Navigate to the project directory:
cd scrapy
- Install dependencies from requirements.txt:
pip install -r requirements.txt
- Run the FastAPI application:
uvicorn main:app --reload
- main corresponds to the Python file (without the .py extension) that contains the FastAPI instance.
app
is the FastAPI instance defined in themain
file.--reload
enables automatic reloading of the server when changes are made to the code.
- Swagger UI: Open your web browser and visit http://localhost:8000/docs. You will see the interactive Swagger UI documentation.
- Redoc: Open your web browser and visit http://localhost:8000/redoc. You will see the Redoc documentation.