This repository contains a web application that scrapes news websites and provides a unified API to access the scraped data. The app is built using the FastAPI framework and uses a Firebase Firestore database for data storage.
- Ensure you have Python installed on your system.
- Install
pipandvirtualenvif not already installed. - Create a Firebase project in the Firebase Console.
- In your Firebase project, navigate to Project Settings and download the
google-services.jsonfile. - Place the downloaded file in the root directory of your project.
- Enable the required Firebase services (e.g., Firestore, Authentication) in the Firebase Console.
- Clone the repository:
git clone https://github.com/your-username/news-api.git
cd news-api- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`- Install dependencies:
pip install -r requirements.txt- Start the Uvicorn server:
uvicorn app:app- Ensure your Firebase configuration matches the app's requirements.
- Refer to the Firebase documentation for advanced setup and troubleshooting.
- Replace
app:appwith the appropriate module and application name if different. - Use environment variables to securely manage Firebase credentials.