Skip to content

Commit 12131dc

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in c74aa31 according to the output from Autopep8. Details: None
1 parent 7ab207e commit 12131dc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Amazon Wishlist Notifier/script.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
WISHLIST_URL = 'https://www.amazon.com/gp/registry/wishlist/YOUR_WISHLIST_ID'
1313
CHECK_INTERVAL = 3600 # Check every hour
1414

15+
1516
def get_wishlist_items():
1617
headers = {
1718
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
@@ -28,14 +29,16 @@ def get_wishlist_items():
2829
price_element = item.find('span', class_='a-offscreen')
2930
price = price_element.get_text().strip() if price_element else "Price not available"
3031
availability = "In stock" if "In Stock" in item.get_text() else "Out of stock"
31-
wishlist.append({'name': name, 'price': price, 'availability': availability})
32+
wishlist.append({'name': name, 'price': price,
33+
'availability': availability})
3234

3335
return wishlist
3436

3537
else:
3638
print("Failed to retrieve wishlist data from Amazon.")
3739
return []
3840

41+
3942
def send_email(subject, message):
4043
msg = MIMEText(message)
4144
msg['Subject'] = subject
@@ -48,6 +51,7 @@ def send_email(subject, message):
4851
server.sendmail(SENDER_EMAIL, RECIPIENT_EMAIL, msg.as_string())
4952
server.quit()
5053

54+
5155
def main():
5256
while True:
5357
wishlist_items = get_wishlist_items()
@@ -66,5 +70,6 @@ def main():
6670

6771
time.sleep(CHECK_INTERVAL)
6872

73+
6974
if __name__ == "__main__":
7075
main()

0 commit comments

Comments
 (0)