Skip to content

An API that scrapes and delivers quotes from platforms like Goodreads and 'Quotes to Scrape' asynchronously, built with FastAPI.

License

Notifications You must be signed in to change notification settings

Petsamuel/Quotia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Scraping Quote Generator

This project demonstrates how to perform asynchronous web scraping using FastAPI, aiohttp, and BeautifulSoup. The application scrapes quotes from two websites: Quotes to Scrape and Goodreads Quotes.

Requirements

  • Python 3.8+
  • FastAPI
  • aiohttp
  • BeautifulSoup4
  • Requests

Installation

  1. Clone the repository:

    git clone https://github.com/Petsamuel/Quotes.git
    
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the dependencies:

    pip install -r requirements.txt

Running the Application

  1. Start the FastAPI server:

    uvicorn main:app --reload
  2. Open your browser and navigate to http://127.0.0.1:8000/ to see the scraped quotes.

Project Files

  • main.py: The main FastAPI application file that handles the asynchronous scraping.
  • requirements.txt: Contains all the dependencies

Usage

The application scrapes quotes from the specified URLs and returns them as a JSON response. The scraping is done asynchronously to improve performance and handle multiple requests concurrently.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

An API that scrapes and delivers quotes from platforms like Goodreads and 'Quotes to Scrape' asynchronously, built with FastAPI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages