https://github.com/marcoradocchia/price-traker
Python tool to track lowering prices on various e-commerce websites.
https://github.com/marcoradocchia/price-traker
amazon e-commerce prices pricesmonitor python sales tracker
Last synced: 8 months ago
JSON representation
Python tool to track lowering prices on various e-commerce websites.
- Host: GitHub
- URL: https://github.com/marcoradocchia/price-traker
- Owner: marcoradocchia
- License: gpl-3.0
- Created: 2021-08-11T11:16:23.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-18T12:17:42.000Z (over 3 years ago)
- Last Synced: 2024-11-09T14:04:29.368Z (11 months ago)
- Topics: amazon, e-commerce, prices, pricesmonitor, python, sales, tracker
- Language: Python
- Homepage:
- Size: 88.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Price Traker: price tracking tool
This is a simple tool to track lowering prices of products on various
websites[^1].
The idea behind this tool is to create a tracking list, in order to check for
the product list items' prices periodically[^2], using fake useragents and
rotating proxies for anonimity and preventing sites to block http requests.## Dependencies
The tool has very minimal dependencies, considering that it uses Python's
integrated libraries for most of the work:
- `beautifulsoup4`;
- `fake-useragent`;
- `lxml` (as BeautifulSoup documentation recommends it for speed);these can be installed via `pip install beautifulsoup4 lxml fake-useragent`.
### Arch packages
For **Arch Linux** users packages are available in the standard repos, hence
for installation using pacman: `# pacman -S python-beautifulsoup4 python-lxml`.
For the `fake-useragent` dependency **AUR** package available, the installation
with an aur-helper such as `yay`: `$ yay -S python-fake-useragent`.## Configuration
Configuration file needs to be created manually and located at
`~/.config/price-traker/config`.
The tool manages configuration using python's `configparser` library, which
requires INI file structure as stated in the library's
[documentation](https://docs.python.org/3/library/configparser.html#supported-ini-file-structure).The `[mail]` section is required, as well as the options illustrated in the
example configuration below, where the angled brackets placeholder need to be
replaced with actual values.
```
[mail]
smtp_server =
port =
notifier_addr =
notifier_psw =
```
## Log and Data
Log and data files are stored locally at `~/.local/share/price-traker/`, which
is auto-generated if not present.
The directory will contain:
- `product_list.json`;
- `traker.log`;
- `useragents_{1..12}.json` (file autoupdated every month containing fake-useragent data).## Usage
```
usage: traker [-h] [-i ] [-l] [-r ] [-u]options:
-h, --help show this help message and exit
-i , --insert
starts tracking (requires valid mail
option for noticitation purposes)
-l, --list list all the tracked products
-r , --remove
stops tracking (
indicates a substring of the product title)
-u, --update update prices for every product
```
| Flag | Description |
| :--- | :--- |
| `-i` | **Add** new product to the tracking list; `` represents the tracked product's url, while `` the address receiving notifications on lowering price |
| `-r` | **Remove** product from the tracking list; `` represents the user willing to stop tracking some product and `` represents some title's substring of the product |
| `-u` | **Updates** all tracked products' prices and notifies via e-mail about the products with lowering prices |
| `-l` | **List** all tracked product and corresponding product followers |[^1]: Currently only _Amazon_ supported
[^2]: e.g. running a cronjob on a Raspberry Pi