Skip to main content

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

productspy-0.1.6.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

productspy-0.1.6-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file productspy-0.1.6.tar.gz.

File metadata

  • Download URL: productspy-0.1.6.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

Hashes for productspy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 9a35fd9fa66ab5f1ffd5c3191fe524cc7c1595ac036e2f60e4f1550335742cc4
MD5 67f604947a9416f071db618cfd762730
BLAKE2b-256 6521284c5b57bf47b13608c0f550f4f2471e79dda6b7b4aa014bce9a079b6352

See more details on using hashes here.

File details

Details for the file productspy-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: productspy-0.1.6-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

Hashes for productspy-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 160520b578dede97a1f4d7b7719f04431f835af362c7b58228715d43e7c46cb9
MD5 11d3c339d72af27ab6482e407f6febc0
BLAKE2b-256 2e0da59b8e84394b24a9ad40cbc1b79db1264bff1a2b8aafce8cd5a3b354bf30

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page