Archived
1
0
Fork 0

feat: add price range filter (#26)

To avoid scalpers' price, the bot now understand filters on prices
using a minimum and maximum value, in a currency and a pattern to
detect the model.

Example:
```
"price_ranges": [
  {"model": "3090", "max": 3000, "currency": "EUR"},
  {"model": "3080", "max": 1600, "currency": "EUR"},
  {"model": "3070", "max": 1200, "currency": "EUR"}
],
```

More details in README.md.

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-05-23 02:32:30 +02:00
commit da532104f8
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
9 changed files with 231 additions and 28 deletions

View file

@ -172,6 +172,7 @@ Options:
* `enable_replies`: reply to original message when product is not available anymore
* `include_regex` (optional): include products with a name matching this regexp
* `exclude_regex` (optional): exclude products with a name matching this regexp
* `price_ranges` (optional): define price ranges for products based on the model. List of rules containing `model` (regex to apply to the product name, string), `min` (minimum expected price, float), `max` (maximum expected price, float), `currency` (price currency used by the filter, string). For example `{"price_ranges":[{"model": "3090", "min": 0, "max": 3000, "currency": "EUR"}]}`
* `browser_address` (optional): set headless browser address (ex: `http://127.0.0.1:9222`)
* `api` (optional):
* `address`: listen address for the REST API (ex: `127.0.0.1:8000`)