The Goodreads Quotes Scraper is a Golang application that extracts quotes from Goodreads and stores them in a PostgreSQL database. The application fetches quotes along with their authors and quote categories, providing an easy way to build a collection of inspiring and thought-provoking quotes. Features
- Web Scraping: Utilizes Golang and the PuerkitoBio/goquery library to scrape quotes from Goodreads.
- Database Storage: Saves quotes, authors, and categories in a PostgreSQL database.
- Configuration: Supports configuration through environment variables or a
config.yaml
file.
Before running the application, ensure you have:
- Golang installed on your machine.
- A running PostgreSQL database with the necessary configuration details.
- Clone the repository:
git clone https://github.com/rifatcanuzunok/quote-scraper
cd quote-scraper
- Install dependencies:
go mod download
- Set up your PostgreSQL database and configure connection details in config.yaml or through environment variables.
Run the application:
go run main.go
Configure the application using environment variables or a config.yaml file. Example config.yaml:
DB_USERNAME: your_db_username
DB_PASSWORD: your_db_password
DB_HOST: localhost
DB_PORT: 5432
DB_NAME: your_db_name