<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mustapha Sahli</title>
    <description>The latest articles on DEV Community by Mustapha Sahli (@mustapha_sahli_95f2412eb8).</description>
    <link>https://dev.to/mustapha_sahli_95f2412eb8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3288364%2F1088fc07-c5e1-467f-9ad6-b873340f6898.jpg</url>
      <title>DEV Community: Mustapha Sahli</title>
      <link>https://dev.to/mustapha_sahli_95f2412eb8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mustapha_sahli_95f2412eb8"/>
    <language>en</language>
    <item>
      <title>🛒 I Built an Amazon Price Tracker to Monitor Multiple Products and Get Price Drop Alerts</title>
      <dc:creator>Mustapha Sahli</dc:creator>
      <pubDate>Mon, 23 Jun 2025 17:56:38 +0000</pubDate>
      <link>https://dev.to/mustapha_sahli_95f2412eb8/i-built-an-amazon-price-tracker-to-monitor-multiple-products-and-get-price-drop-alerts-20nd</link>
      <guid>https://dev.to/mustapha_sahli_95f2412eb8/i-built-an-amazon-price-tracker-to-monitor-multiple-products-and-get-price-drop-alerts-20nd</guid>
      <description>&lt;p&gt;&lt;strong&gt;Tired of checking Amazon every day to see if a product’s price went down?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
So was I. That’s why I built a simple tool that automatically tracks prices on multiple Amazon items and alerts me when they drop — no browser extensions, no manual checking.&lt;/p&gt;

&lt;p&gt;In this post, I’ll walk you through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The problem that led me to build this&lt;/li&gt;
&lt;li&gt;How it works behind the scenes&lt;/li&gt;
&lt;li&gt;Key features&lt;/li&gt;
&lt;li&gt;Lessons I learned&lt;/li&gt;
&lt;li&gt;And how you can get or build something similar&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚨 The Problem: Price Watching Wastes Time
&lt;/h2&gt;

&lt;p&gt;I often add items to my Amazon wishlist and wait for discounts.&lt;br&gt;&lt;br&gt;
But unless I checked manually — daily or weekly — I’d miss the best deals.&lt;br&gt;&lt;br&gt;
Most price-tracking extensions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Browser-dependent&lt;/li&gt;
&lt;li&gt;Limited to one product&lt;/li&gt;
&lt;li&gt;Bloated or subscription-based&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a developer who loves automating boring stuff, I knew I could do better.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧰 The Solution: A Simple Python Script
&lt;/h2&gt;

&lt;p&gt;I wrote a Python script that does the job without needing to open a browser or install anything extra. It runs locally and quietly checks all the Amazon product URLs I give it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Add/remove multiple products
&lt;/li&gt;
&lt;li&gt;✅ Check all prices instantly or on a daily schedule
&lt;/li&gt;
&lt;li&gt;✅ Email alerts when prices drop
&lt;/li&gt;
&lt;li&gt;✅ Tracks product title, current price, and date
&lt;/li&gt;
&lt;li&gt;✅ Easy CLI menu for interaction&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧪 Under the Hood: Tools &amp;amp; Libraries
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;bs4&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BeautifulSoup&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;schedule&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;smtplib&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;email.message&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;EmailMessage&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;requests + BeautifulSoup to scrape Amazon product pages&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;schedule to automate daily checks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;smtplib to send email alerts to myself (configurable)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CSV file to store and update product data&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The script runs on any machine with Python 3 installed.&lt;/p&gt;

&lt;h2&gt;
  
  
  🖼️ Menu System: Simple and Clean
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;1. Add product to track
2. Remove product
3. List tracked products
4. Check all prices now
5. Start scheduled monitoring
6. Configure email alerts
7. Change schedule &lt;span class="nb"&gt;time
&lt;/span&gt;8. Exit
&lt;span class="nt"&gt;--------------------------------------------------&lt;/span&gt;
📅 Current schedule: Daily at 09:00
📧 Email alerts: Disabled
📦 Tracked products: 0
&lt;span class="nt"&gt;--------------------------------------------------&lt;/span&gt;
Select an option &lt;span class="o"&gt;(&lt;/span&gt;1-8&lt;span class="o"&gt;)&lt;/span&gt;:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📬 What a Price Drop Email Looks Like
&lt;/h2&gt;

&lt;p&gt;If a tracked item’s price drops, you’ll get an alert like this:&lt;/p&gt;

&lt;p&gt;Subject: 🔔 Price Drop Alert: Wireless Headphones&lt;/p&gt;

&lt;p&gt;Good news! The price has dropped from $89.99 to $64.99&lt;/p&gt;

&lt;p&gt;Product: Wireless Headphones&lt;br&gt;
Link: &lt;a href="https://www.amazon.com/dp/B07XXXXX" rel="noopener noreferrer"&gt;https://www.amazon.com/dp/B07XXXXX&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔄 Challenges Faced
&lt;/h2&gt;

&lt;p&gt;Amazon’s layout varies per region and product — had to add multiple selectors&lt;/p&gt;

&lt;p&gt;Some products don’t show price due to availability/stock&lt;/p&gt;

&lt;p&gt;Rate-limiting and user-agent headers required for stable scraping&lt;/p&gt;

&lt;p&gt;Handling multiple URLs without hardcoding was key&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 What I Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Automating small personal problems can lead to useful tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even a CLI app can save people time &amp;amp; money&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Building your own tools makes you a better programmer&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📦 Want to Try It?
&lt;/h2&gt;

&lt;p&gt;I’ve packaged everything and made it available here:&lt;br&gt;
👉 &lt;a href="https://tailorcraft55.gumroad.com/l/amazon_price_tracker_scheduled" rel="noopener noreferrer"&gt;Amazon Multi-Product Price Tracker on Gumroad&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Includes:&lt;br&gt;
Script files (.py)&lt;br&gt;
PDF setup instructions&lt;br&gt;
Lifetime access + updates&lt;/p&gt;

&lt;h2&gt;
  
  
  🔗 Bonus: See It on X
&lt;/h2&gt;

&lt;p&gt;I also shared the launch on X (Twitter) here:&lt;br&gt;
👉 &lt;a href="https://x.com/TailoooorSahli/status/1937197401913327630" rel="noopener noreferrer"&gt;https://x.com/TailoooorSahli/status/1937197401913327630&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💬 Final Thoughts&lt;br&gt;
This started as a side project to save time, but it turned into something others find useful too.&lt;br&gt;
If you like automating daily tasks or saving money on Amazon, I’d love to hear your feedback — or help you build your own version.&lt;/p&gt;

&lt;p&gt;Thanks for reading! 🙌&lt;br&gt;
Feel free to reach out or connect with me!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
