Web Scraping - Python Library
A Python library that lets you easily scrape data from popular websites using basic product information
Overview
For many, collecting product data can be helpful for monitoring price changes or helping decide which e-commerce site to purchase from. However, creating a web scraper from scratch can be cumbersome and time consuming. My goal is to make it easier for people to collect product data, and this Python library aims to simplify the web scraping process. With basic inputs like product information and store url, you can have easy access to rich product information.
Installation
To install, run the following:
pip install web-scraper-python-library
Usage
Product Search
The following code will retrieve and print the product data for an iphone 12 from Amazon as a JSON object.
product: a product name, like you would put into the product search page of a company's website
company: 'eBay', 'Walmart', or 'Amazon'
Code
from web_scraper_python_library import main as m
product_data = m.main(product = 'iphone 12', company = 'Amazon')
print(product_data)
Output
[
{
"name": "Apple iPhone 12, 64GB, Green - Fully Unlocked (Renewed)",
"price": 390.0,
"extraction_date": "2023-03-23 17:38:32"
},
...
{
"name": "Apple iPhone 12 Mini, 64GB, Black - Unlocked (Renewed)",
"price": 312.0,
"extraction_date": "2023-03-23 17:38:32"
}
]
Metadata
Release files for web-scraper-python-library 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| web-scraper-python-library-0.1.1.tar.gz | 10.3 kB | Without provenance | Details for web-scraper-python-library-0.1.1.tar.gz |
Release files / web-scraper-python-library-0.1.1.tar.gz
| Download URL | web-scraper-python-library-0.1.1.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49c662da5fd5242ffa18cd0866462f7cc329250f594badacf9da4d5b6c153fde
|
|
BLAKE2b-256 checksum How to use checksums |
6a42f2ff75828e8295fb6389ace95419d6999d790d61f24359d6bc751a342a70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.5
|
Security for web-scraper-python-library 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.