Scraper for the Book Depository website
Project description
Book Depository Scraper
Description
The Book Depository Scraper is a Python package application for scraping the Book Depository website based on a specific genre and number of items.
Tools/Libraries required
- Python 3.9 : Base programming language for development. The latest version of python.
- bs4
- pandas
- requests
Installation
Use the package manager pip to install bookdepositoryscraper.
To install directly from github repository
!pip install git+https://github.com/adeyinkaoresanya/bookdepositoryscraper.git
Usage
The scraper takes in two arguments---genre and number of items--- returns a dataframe which can be cleaned and converted to CSV.
To collect data without cleaning:
from scraper import Scraper
scraper = Scraper("thriller", 300)
df= scraper.scrape_data()
scraper.create_csv(df, "books")
To collect clean data:
from scraper import Scraper
from src.preprocess import ProcessData
scraper = Scraper("thriller", 300)
df= scraper.scrape_data()
s= ProcessData()
clean_df= s.clean_dataframe(df_total)
scraper.create_csv(clean_df, "books")
Contribution
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
The MIT License - Copyright (c) 2021 - Adeyinka J. Oresanya
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bookdepositoryscraper-0.1.1.tar.gz.
File metadata
- Download URL: bookdepositoryscraper-0.1.1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee1722c06fbd50343342b737dd24423214a92b64234f33e9d4ecabd31ce34098
|
|
| MD5 |
d06ffb141b9f72c78353c42ddd4edbf5
|
|
| BLAKE2b-256 |
f2386ed18af14646d9ef4212d934976141cc6ac2613122875d2f5adf75f15202
|
File details
Details for the file bookdepositoryscraper-0.1.1-py3-none-any.whl.
File metadata
- Download URL: bookdepositoryscraper-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc98fce54702852441fd0b823f796e2bbcbd979402e0dfe120fbae274f73d73d
|
|
| MD5 |
46a6463eef3317816d740dcb46dfebee
|
|
| BLAKE2b-256 |
42386d49e452250d0e466b4b3242fdf7d65089729fa6a0fbeb6d33fcadce230a
|