A simple Python library to fetch product name and price from popular e-commerce websites.
Project description
productspy
A simple Python library to grab product info like name and price from popular shopping sites like Amazon, Noon, AliExpress, Carrefour, and Extra.
What it does
- Pulls out the product name, price, and URL from product pages.
- Supports multiple sites using different ways (HTML parsing, JSON-LD, or Playwright for sites that load content with JavaScript).
- Manages cookies so it can get around some security stuff on sites like AliExpress.
- Super easy to use — just give it a product link, and it’ll give you the info.
How to install
pip install -r requirements.txt
playwright install
How to use
from productspy import get_product_info
url = "put your product URL here"
info = get_product_info(url)
print(f"Product Name: {info['name']}")
print(f"Price: {info['price']}")
print(f"URL: {info['url']}")
Supported sites
- Amazon
- Noon
- AliExpress
- Carrefour
- Extra
Cookies update (for AliExpress)
If cookies expire, the library will open a browser window so you can log in or verify yourself. Just follow the steps and close the browser when you’re done.
Contribute
Feel free to open an issue or pull request if you wanna help improve this.
Project details
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 productspy-0.1.5.tar.gz.
File metadata
- Download URL: productspy-0.1.5.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9792502776da0dc9d09647e9884a1604884c1edca0da9ddfbbc8fbca4dae490b
|
|
| MD5 |
4597a2b59558001189841dc01bbc61c4
|
|
| BLAKE2b-256 |
4b41545e0378da8b807c31c2eb7efbbf5df7f6cea85bd6f7d1cb4fc8bd10676f
|
File details
Details for the file productspy-0.1.5-py3-none-any.whl.
File metadata
- Download URL: productspy-0.1.5-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f65698ed12273512901e708233a5e3247411453b510633cf680e490244ad3de6
|
|
| MD5 |
a8f243b8cce904cc1a4854c8a6e62633
|
|
| BLAKE2b-256 |
2673d06702b8107a43dc83266fc476f020fdd9fe8ed2edd58210e3ccde88f6c4
|