Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gamut73/bookshopbooksapi

Scrap Bobshop api for buying books
https://github.com/gamut73/bookshopbooksapi

Last synced: about 1 month ago
JSON representation

Scrap Bobshop api for buying books

Awesome Lists containing this project

README

        

# BobShop Book Scraper

This is a Spring Boot application that uses Selenium to scrape `bobshop.co.za` for books. It then makes some API calls to provide useful information about the books being sold. This application is perfect for shopping 2nd hand books.

## Requirements

- Java 8 or higher
- Gradle
- Selenium WebDriver

## Local Setup

1. Clone the repository to your local machine.
```bash
git clone https://github.com/Gamut73/bobshop-book-scraper.git
```

2. Navigate to the project directory.
```bash
cd bobshop-book-scraper
```

3. Build the project using Gradle.
```bash
./gradlew build
```

4. Run the application.
```bash
./gradlew bootRun
```

## Docker Setup

This application can also be run using Docker. Follow the steps below to build and run the application in a Docker container.

1. Build the Docker image.
```bash
docker build -t bobshop-book-scraper .
```

2. Run the Docker container.
```bash
docker run -p 8080:8080 bobshop-book-scraper
```

The application will start and begin scraping `bobshop.co.za` for book information. The results will be available in the console output.

Please note that the Dockerfile assumes that the application's JAR file is located at `build/libs/BobShopBooksAPI-0.0.1-SNAPSHOT.jar` and that the Chrome driver is located at `chrome_driver/chromedriver.exe`. If these files are located elsewhere, you will need to update the Dockerfile accordingly.

## Postman
Please see the postman collection under the postman folder for examples of how to interact with the API.

## Note

Please ensure that you have the appropriate WebDriver for your browser installed and available in your system's PATH. For more information on how to set this up, please refer to the [Selenium documentation](https://www.selenium.dev/documentation/en/webdriver/driver_requirements/).