Skip to content

Commit

Permalink
updating
Browse files Browse the repository at this point in the history
  • Loading branch information
garland committed Apr 25, 2024
1 parent 7b749c6 commit b8ef46a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions internet-item-price/alert_on_low_price/alert_on_low_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@
if should_skip_item:
continue

## If the price in item['price']['high'] is greater than the product['extracted_price'], then skip this product
if float(product['extracted_price']) > float(item['price']['high']):
# print(f"Skipping (price): {product['price']}\n")
continue

## If the price in item['price']['low'] is lower than the product['extracted_price'], then skip this product
if float(product['extracted_price']) < float(item['price']['low']):
# print(f"Skipping (price): {product['price']}\n")
continue

## Print the items that are left after all of the various filters
print(f"Title: {product['title']}\nPrice: {product['price']}\nSource: {product['source']}\n")


Expand Down
7 changes: 5 additions & 2 deletions internet-item-price/alert_on_low_price/search_items_gar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ search_items:
not_from_these_sellers:
- AliExpress.com
price:
low: 25
high: 53
## If the price is lower than the "low", then filter it out
## Sometime if the price is too low, it is a scam or just not the product you want
## You can set this to zeror/0 to disable this filter
low: 10
high: 45

0 comments on commit b8ef46a

Please sign in to comment.