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 8bb6930 commit 7b749c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions internet-item-price/alert_on_low_price/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ values
```

# Setup
Can get the google serg API key at: https://serpapi.com/playground?engine=google_shopping&q=Aqara+water+leak+sensor+3+pack&location=United+States&gl=us&hl=en

env:
```
export SERP_API_KEY=
export SEARCH_ITEMS_YAML_FILE=search_items_gar.yaml
```

Run:
Expand Down
3 changes: 2 additions & 1 deletion internet-item-price/alert_on_low_price/alert_on_low_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
## https://serpapi.com/playground?engine=google_shopping&q=aqara+water+leak+sensor+3+pack&location=United+States&gl=us&hl=en

api_key = os.environ['SERP_API_KEY']
search_items_gar_yaml = os.environ['SEARCH_ITEMS_YAML_FILE']

## Open the yaml file and read the contents
with open('search_items_gar.yaml', 'r') as file:
with open(search_items_gar_yaml, 'r') as file:
data = yaml.safe_load(file)

# Access the list by its key and loop through it
Expand Down

0 comments on commit 7b749c6

Please sign in to comment.