https://github.com/tinloaf/pricegrabber
A python package to scrape prices off various websites
https://github.com/tinloaf/pricegrabber
library python3 scraper
Last synced: 11 months ago
JSON representation
A python package to scrape prices off various websites
- Host: GitHub
- URL: https://github.com/tinloaf/pricegrabber
- Owner: tinloaf
- License: mit
- Created: 2018-12-23T23:16:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-26T21:28:00.000Z (over 7 years ago)
- Last Synced: 2024-12-08T20:16:57.587Z (over 1 year ago)
- Topics: library, python3, scraper
- Language: Python
- Size: 173 KB
- Stars: 11
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
PriceGrabber
============
This is a Python package to retrieve prices for specific products from all sorts of websites, such as Amazon, Aliexpress, or price comparison websites.
New websites can be supported by means of a simple configuration entry. Currently supported sites include:
* Geizhals.{de, at}
* Amazon.{de, com, co.uk, probably all)
* Idealo.de
* Aliexpress.com
Usage
-----
Usage is pretty simple. Mostly you should be able to put in an URL to the site of a product you're interested in, and you should get out a price (or a list of prices). Here is an Example for an AliExpress product:
```python
>>> from pricegrabber import Grabber
>>> cfg = {"url": "https://de.aliexpress.com/store/product/Cherry-cherry-shaft-shaft-mx-mechanical-keyboard-shaft-switch-black-shaft-tea-shaft-white-shaft-green/2230037_32682571027.html?spm=a2g0x.12010612.8148356.2.75987786TNUZUO"}
>>> g = Grabber(cfg)
>>> g.grab()
[(8.9, '$')]
```
So in this case we know that the pack of Cherry MX key switches from AliExpress costs $8,90. Note that a list is returned. Some sites may report multiple prices instead of just one.