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.5.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.5-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

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

Hashes for productspy-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9792502776da0dc9d09647e9884a1604884c1edca0da9ddfbbc8fbca4dae490b
MD5 4597a2b59558001189841dc01bbc61c4
BLAKE2b-256 4b41545e0378da8b807c31c2eb7efbbf5df7f6cea85bd6f7d1cb4fc8bd10676f

See more details on using hashes here.

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

Hashes for productspy-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f65698ed12273512901e708233a5e3247411453b510633cf680e490244ad3de6
MD5 a8f243b8cce904cc1a4854c8a6e62633
BLAKE2b-256 2673d06702b8107a43dc83266fc476f020fdd9fe8ed2edd58210e3ccde88f6c4

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