5 Best Vacuum For Deep Cleaning Carpet: Our Expert Picks

Having plush, clean carpets can transform the feel of your home, but maintaining that freshness, especially against everyday spills, pet hair, and tracked-in dirt, requires a powerful tool. Finding the best vacuum for deep cleaning carpet isn’t just about surface-level tidiness; it’s about tackling grime embedded deep within the fibers, refreshing your living space, and even improving indoor air quality. Whether you’re battling stubborn pet stains or simply aiming for a thorough seasonal clean, the right machine can make all the difference. We’ve meticulously tested and reviewed a range of top contenders to help you discover the perfect partner for restoring your carpets to their pristine glory.

Quick Product Comparison

.modern-product-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
font-size: 14px;
}
.modern-product-table thead th {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 10px 8px;
text-align: left;
font-weight: 600;
font-size: 15px;
border: none;
}
.modern-product-table tbody td {
padding: 10px 8px;
border-bottom: 1px solid #f0f0f0;
vertical-align: middle;
}
.modern-product-table tbody tr:last-child td {
border-bottom: none;
}
.product-name {
font-weight: 600;
color: #2d3748;
font-size: 14px;
line-height: 1.4;
max-width: 300px;
}
.product-name a {
color: inherit;
text-decoration: none;
}
.product-name a:hover {
color: #ff6b35 !important;
}
.product-image-cell {
text-align: center;
width: 80px;
}
.product-image-cell img {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 8px;
border: 2px solid #e2e8f0;
transition: transform 0.2s ease;
}
.product-image-cell img:hover {
transform: scale(1.05);
}
.price-button-cell {
text-align: center;
width: 140px;
}
.price-button {
display: inline-block;
background: linear-gradient(135deg, #ff9900 0%, #ff6b35 100%);
color: white;
padding: 8px 12px;
text-decoration: none !important;
border-radius: 6px;
font-weight: 600;
font-size: 13px;
box-shadow: 0 2px 8px rgba(255,153,0,0.3);
transition: all 0.2s ease;
white-space: nowrap;
}
.price-button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(255,153,0,0.4);
}
@media (max-width: 768px) {
.modern-product-table {
font-size: 13px;
}
.modern-product-table thead th {
padding: 8px 6px;
font-size: 14px;
}
.modern-product-table tbody td {
padding: 8px 6px;
}
.product-name {
font-size: 13px;
max-width: 200px;
}
.product-image-cell img {
width: 50px;
height: 50px;
}
.price-button {
padding: 6px 10px;
font-size: 12px;
}
}
@media (max-width: 480px) {
.modern-product-table {
font-size: 12px;
}
.modern-product-table thead th {
padding: 6px 4px;
font-size: 13px;
}
.modern-product-table tbody td {
padding: 6px 4px;
}
.product-name {
font-size: 12px;
max-width: 150px;
}
.product-image-cell {
width: 60px;
}
.product-image-cell img {
width: 40px;
height: 40px;
}
.price-button-cell {
width: 120px;
}
.price-button {
padding: 5px 8px;
font-size: 11px;
}
}

Product Image Check Price
1. Kenmore DS1030 Cordless Stick Vacuum: Lightweight 2-in-1 for Carpet, Hardwood Floors, and Pet Hair…. Kenmore DS1030 Cordless Stick Vacuum: Lightweight 2-in-1 for Carpet, H Check Price
2. Kenmore KW4010 Pet Portable Carpet Cleaner: Powerful Deep Cleaning for Rugs, Upholstery, Pet Stains…. Kenmore KW4010 Pet Portable Carpet Cleaner: Powerful Deep Cleaning for Check Price
3. Hoover PowerScrub Deluxe Carpet Cleaner: Deep Cleaning Shampooer for Carpets and Upholstery…. Hoover PowerScrub Deluxe Carpet Cleaner: Deep Cleaning Shampooer for C Check Price
4. BISSELL TurboClean Upright Carpet Cleaner: Deep Cleaning for Carpets and Pet Stains…. BISSELL TurboClean Upright Carpet Cleaner: Deep Cleaning for Carpets a Check Price
5. Shark Navigator Lift-Away Deluxe Upright Vacuum: HEPA Filter for Carpets and Pet Hair…. Shark Navigator Lift-Away Deluxe Upright Vacuum: HEPA Filter for Carpe Check Price

Our Top 5 Best Vacuum For Deep Cleaning Carpet Reviews – Expert Tested & Recommended

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

🏆 Best Choice

1. Kenmore DS1030 Cordless Stick Vacuum: Lightweight 2-in-1 for Carpet, Hardwood Floors, and Pet Hair.

Kenmore DS1030 Cordless Stick Vacuum: Lightweight 2-in-1 for Carpet, Hardwood Floors, and Pet Hair.

The Kenmore DS1030 Cordless Stick Vacuum is a highly versatile and convenient option for maintaining clean carpets and hard floors. Its lightweight, 2-in-1 design makes daily cleaning a breeze, easily transforming from a stick vacuum to a handheld unit. This model is particularly effective for pet owners, offering specific features designed to tackle stubborn pet hair without hassle.

Key Features That Stand Out

Cordless 2-in-1 Design: Offers ultimate flexibility as both an upright stick vacuum and a portable handheld for varied cleaning tasks.

Easycut Nozzle: Ingenious feature that allows for effortless removal of tangled hair and debris from the brush roll with a push of a button.

Long Run Time: Provides up to 45 minutes of continuous suction on low mode, suitable for most average-sized homes.

Two Speed Settings: Adaptable power for different surfaces and cleaning needs, from light dusting to more intensive dirt removal.

Why We Recommend It

We recommend the Kenmore DS1030 because it brilliantly combines convenience with powerful performance, especially for households with pets. Its cordless nature removes the struggle of tangled wires, while the Easycut Nozzle is a game-changer for pet owners. It’s a fantastic choice for those seeking a practical and efficient vacuum for deep cleaning carpet on a daily basis and for quick spot cleanups.

Best For

This vacuum is ideal for pet owners, individuals seeking a lightweight and versatile cleaning solution, and those with a mix of carpeted and hard floors who need efficient daily maintenance.

Pros and Cons

Pros:
  • Cordless design offers excellent maneuverability and freedom.
  • Effective Easycut Nozzle simplifies pet hair removal from the brush roll.
  • Lightweight and converts to handheld for versatile cleaning.
  • Good battery life for typical daily cleaning tasks.
Cons:
  • Suction might be less powerful than corded models for extremely deep, embedded dirt.
  • Battery life might not be sufficient for very large homes on higher power settings.

Customer Reviews

Customer Review: “Great quality product. Easy to use; lightweight….good suction, good battery life…..no cords to trip over (I’m a senior living alone and vacumn cords are easy to tangle and trip over). Great to have handheld vac too to take to car or for small pieces of upholstered furniture or indoor windowsills”

Customer Review: “Lightweight, cleans well, great suction, perfect on stairs, you can use small vacuum on furniture/auto/hard to get to areas. Works great on area rugs and anywhere you need a quick and easy clean yet can handle larger areas as well. I highly recommend this product.”

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

⭐ Editor’s Choice

2. Kenmore KW4010 Pet Portable Carpet Cleaner: Powerful Deep Cleaning for Rugs, Upholstery, Pet Stains.

Kenmore KW4010 Pet Portable Carpet Cleaner: Powerful Deep Cleaning for Rugs, Upholstery, Pet Stains.

The Kenmore KW4010 Pet Portable Carpet Cleaner is specifically engineered to tackle the toughest pet-related messes. This powerful machine provides professional-grade deep cleaning, targeting embedded dirt, stains, and odors from rugs, carpets, and upholstery. Its specialized features make it an invaluable tool for pet owners, ensuring quick and effective clean-ups.

See also  7 Best Travel Vacuum Bags

Key Features That Stand Out

Professional Grade Clean: Features dual powered brush rolls designed to lift and remove deep-seated dirt and stains effectively.

Dual Powered Brush Rolls: These brushes work together to agitate carpet fibers, making it easier to extract even dried-on pet accidents and spills.

Easy Clean Removable Cover: Allows convenient access for maintenance, ensuring the brush rolls remain free of hair and debris for optimal performance.

Portable Design: Lightweight and compact, making it easy to carry to different areas of the house or even to clean car interiors.

Why We Recommend It

For anyone dealing with pet accidents, the Kenmore KW4010 is an absolute lifesaver. It’s not just a surface cleaner; it genuinely deep cleans, eliminating odors and stains that vacuums alone can’t touch. Its portable nature means you can address spills immediately, preventing them from setting. This is truly the best vacuum for deep cleaning carpet spots and upholstery when pets are in the picture.

Best For

Pet owners, individuals needing to quickly clean up spills and stains, and anyone looking for an efficient solution to refresh upholstery and small carpeted areas.

Pros and Cons

Pros:
  • Exceptional at removing pet stains and odors.
  • Dual brush rolls provide thorough agitation for deep cleaning.
  • Easy maintenance with a removable brush roll cover.
  • Portable and lightweight for quick spot treatments.
Cons:
  • Smaller tank capacity requires more frequent refills for larger areas.
  • Primarily designed for spot cleaning, not whole-room carpet cleaning.

Customer Reviews

Customer Review: “I’d give this machine 10 stars if it were possible!! Of the 3 different carpet washers, this one is the best!I owned a Dirt Devil carpet cleaner. It did a better than the water system attachments for my Rainbow Cleaner. The suction was better, but it required additional upper body effort to extract”

Customer Review: “I was skeptical about it because of the small diameter hose and I always liked the big green machine.It works as good as the rental!I used this machine on all different carpet types and it worked perfect.It’s also quieter than the rental.It’s the same as using an upright vacuum.It extracted almost a”

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

💰 Best Budget

3. Hoover PowerScrub Deluxe Carpet Cleaner: Deep Cleaning Shampooer for Carpets and Upholstery.

Hoover PowerScrub Deluxe Carpet Cleaner: Deep Cleaning Shampooer for Carpets and Upholstery.

The Hoover PowerScrub Deluxe Carpet Cleaner is a popular choice for homeowners seeking comprehensive deep cleaning without breaking the bank. This shampooer is designed to rejuvenate carpets and upholstery by combining powerful scrubbing action with efficient dirt extraction. It’s a fantastic solution for maintaining fresh, clean carpets throughout your home, especially with its specialized tools for pet messes.

Key Features That Stand Out

SpinScrub Brush System: Features five counter-rotating brushes that provide 360-degree cleaning, gently but effectively scrubbing carpet fibers from all angles.

HeatForce Technology: Applies hot air to speed up the drying process, reducing the time your carpets stay wet after cleaning.

Versatile Tools: Comes with a dedicated pet tool for stubborn stains and an upholstery tool for cleaning furniture and stairs.

Dual Tank Technology: Separate tanks for clean and dirty water ensure you’re always cleaning with fresh solution and make filling, emptying, and rinsing a breeze.

Why We Recommend It

We highly recommend the Hoover PowerScrub Deluxe for its exceptional value and thorough cleaning capabilities. It’s a robust yet user-friendly machine that delivers impressive results, making it an excellent choice for a dedicated carpet deep cleaner. The inclusion of HeatForce drying is a significant advantage, and its specialized tools ensure no corner of your home is left unclean.

Best For

Homeowners with extensive carpeting, pet owners, and budget-conscious individuals who need a full-size, powerful carpet shampooer for periodic deep cleaning.

Pros and Cons

Pros:
  • Excellent deep cleaning performance with SpinScrub brushes.
  • HeatForce technology significantly reduces carpet drying time.
  • Comes with useful tools for pet messes and upholstery.
  • Dual tanks simplify operation and maintenance.
Cons:
  • Can be somewhat heavy and bulky when filled with water.
  • May require multiple passes for heavily soiled areas.

Customer Reviews

Customer Review: “I bought this to replace my rug doctor, which broke apart after years of use (of course it broke halfway through cleaning the living room carpet). I will state right off the bat, the rug doctor gave a deeper clean. That said, the rug doctor was significantly more expensive. When I looked up the cost”

Customer Review: “Things I know you want to know:// Worth it?Yes. I paid $129 but would have paid more knowing what I know.// Does it get deep?Yes. I used Oxy carpet cleaner, but man does it clean.// Noticeable difference?Yes! You’ll notice that my carpet is much cleaner. But keep in mind that my carpet is gray and b”

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

4. BISSELL TurboClean Upright Carpet Cleaner: Deep Cleaning for Carpets and Pet Stains.

BISSELL TurboClean Upright Carpet Cleaner: Deep Cleaning for Carpets and Pet Stains.

The BISSELL TurboClean Upright Carpet Cleaner provides a powerful and convenient solution for tackling everyday messes and pet stains on carpets and area rugs. Designed with BISSELL’s commitment to saving pets, every purchase contributes to the BISSELL Pet Foundation. This machine is lightweight and compact, making it ideal for smaller spaces or quick clean-ups without compromising on deep cleaning effectiveness.

Key Features That Stand Out

4-Row DeepReach PowerBrush: Combines with powerful suction to effectively lift and remove ground-in dirt and tough stains from carpet fibers.

Lightweight Design: Easy to maneuver and store, perfect for smaller homes or quick spot treatments in high-traffic areas.

Eco-Conscious Purchase: A portion of every sale goes to the BISSELL Pet Foundation, supporting homeless pets.

Outcleans Competitive Lightweight Cleaners: Engineered to outperform other lightweight models in its class, ensuring superior cleaning results.

Why We Recommend It

For those who need a reliable yet compact carpet cleaner, the BISSELL TurboClean Upright is an excellent choice. It’s remarkably effective for its size, making it a viable option for a deep cleaning carpet vacuum in smaller homes or for quick clean-ups. The fact that it supports a great cause adds to its appeal, making it a purchase you can feel good about.

Best For

Individuals in apartments or smaller homes, pet owners needing to tackle common pet messes, and those looking for a lightweight and easy-to-store carpet cleaner for periodic use.

Pros and Cons

Pros:
  • Lightweight and compact, making it easy to use and store.
  • Effective at removing embedded dirt and pet stains with its PowerBrush.
  • Supports the BISSELL Pet Foundation with every purchase.
  • Outperforms comparable lightweight carpet cleaners.
Cons:
  • Smaller water tank capacity means more frequent refills for larger areas.
  • May not offer the same heavy-duty performance as larger, more expensive models.

Customer Reviews

Customer Review: “1st time using so can’t speak to longevity of this product.Super easy assembly-just click together.Very lightweight and with that feature comes smaller capacity solution tank and narrower cleaning path but worth an extra refill to save your shoulder!Can’t really comment on normal drying time as I ma”

Customer Review: “Water container is medium, enough for 1 8×8 0r 10x 10 room, but it does a great job, we replenished like 4 times in one time and it cleaned our whole house carpet rooms wonderfully. We like it, small enough to hide in one of our closets. Plenty power and brush spin. Simple operation, Cleaned very g”

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

5. Shark Navigator Lift-Away Deluxe Upright Vacuum: HEPA Filter for Carpets and Pet Hair.

Shark Navigator Lift-Away Deluxe Upright Vacuum: HEPA Filter for Carpets and Pet Hair.

The Shark Navigator Lift-Away Deluxe Upright Vacuum is a versatile powerhouse designed to deliver strong suction for deep cleaning carpets and tackling bare floors. Its unique Lift-Away functionality allows for easy transformation into a portable canister vacuum, making it incredibly adaptable for various cleaning scenarios, including above-floor cleaning and tight spaces. Equipped with a HEPA filter and Anti-Allergen Complete Seal Technology, it’s an excellent choice for allergy sufferers and pet owners.

Key Features That Stand Out

Powerful Suction: Provides robust suction for effective deep cleaning on carpets and efficient pickup on hard floors.

Lift-Away Functionality: The detachable pod allows you to easily clean under furniture, on stairs, or in hard-to-reach areas without moving heavy furniture.

Anti-Allergen Complete Seal Technology + HEPA Filter: Traps 99.9% of dust and allergens inside the vacuum, preventing them from escaping back into the air.

Swivel Steering: Offers excellent control and maneuverability around obstacles and furniture.

Why We Recommend It

The Shark Navigator Lift-Away Deluxe is a fantastic all-around vacuum, especially if you’re looking for a versatile dry vacuum that performs exceptionally well on carpets. Its powerful suction combined with the Lift-Away feature makes it incredibly practical for a variety of cleaning tasks. For those prioritizing allergen removal and effective pet hair pickup, this is one of the best vacuum for deep cleaning carpet options available.

Best For

Allergy sufferers, pet owners, homes with a mix of carpeted and bare floors, and users who appreciate a vacuum with strong suction and versatile cleaning capabilities.

Pros and Cons

Pros:
  • Strong suction for impressive carpet deep cleaning and bare floor performance.
  • Lift-Away feature provides great versatility for above-floor and under-furniture cleaning.
  • Advanced anti-allergen filtration with HEPA filter for cleaner air.
  • Excellent at picking up pet hair.
Cons:
  • Can feel a bit heavy and bulky in its upright mode.
  • Not a wet carpet cleaner; primarily for dry vacuuming.

Customer Reviews

Customer Review: “Warning, it’s a long read, but I wanted to go into deep detail.To start, I have been a Rainbow vacuum user for so long. I love them and felt they worked amazingly.Next, I have 3 dogs & a cat. One is a thick coat lab and the cat sheds so much as well.Another next, I have horrible allergies and wanted”

Customer Review: “Definitely get this vacuum. I have a 1bd apartment that is 80% carpet and it works great. I am sure there are better vacuums out there but this vacuum will get a very good amount of your animals hair and dirt out of the carpet. The brush on it definitely works great however longer hair does get tan”

Complete Buying Guide for Best Vacuum For Deep Cleaning Carpet

Choosing the best vacuum for deep cleaning carpet involves more than just picking the first one you see. It’s about understanding what makes a carpet cleaner truly effective for your specific needs. Let’s break down the essential factors and considerations.

Essential Factors We Consider

When we evaluate deep cleaning carpet vacuums, we focus on several critical performance indicators:

  • Suction Power: This is paramount. A strong motor and efficient airflow are necessary to lift deeply embedded dirt, pet hair, and moisture from carpet fibers. For wet cleaners, strong suction also means faster drying times.
  • Brush System: The type and action of the brush rolls significantly impact cleaning effectiveness. Look for multi-row brushes, rotating brushes (like SpinScrub), or power brushes that agitate the carpet to dislodge dirt and work in cleaning solutions.
  • Water Tank Capacity: Larger tanks mean fewer refills and empties, which is crucial for cleaning extensive carpeted areas without interruption. Separate tanks for clean and dirty water are a must for hygienic cleaning.
  • Drying Time: No one wants soggy carpets for hours. Features like powerful extraction and HeatForce technology (which applies warm air) can dramatically reduce drying time, preventing mold and mildew growth.
  • Portability and Maneuverability: Consider the size and weight. A lighter, more maneuverable cleaner is easier to push and carry, especially if you have stairs or multiple rooms. However, larger machines often offer greater tank capacity and wider cleaning paths.
  • Specialized Tools and Attachments: For pet owners or those with upholstery, specific tools like pet hair removers, crevice tools, and upholstery attachments are incredibly useful for tackling targeted messes.
  • Filtration System: For dry vacuums, a good filtration system, especially one with a HEPA filter and an Anti-Allergen Complete Seal, is vital for trapping dust and allergens, improving indoor air quality.

Budget Planning

Your budget plays a significant role in your choice, but it doesn’t mean sacrificing effectiveness. You can find excellent deep cleaning options across various price points:

  • Entry-Level (under $150): These often include portable spot cleaners or basic upright carpet shampooers. They’re great for occasional use, small apartments, or targeted stain removal.
  • Mid-Range ($150-$300): This segment offers a sweet spot with full-size upright carpet cleaners that provide robust cleaning power, larger tanks, and often include features like heated drying or specialized brush systems. Many of our top picks fall into this category, offering excellent value.
  • High-End ($300+): These premium machines boast advanced features, superior suction, professional-grade cleaning capabilities, larger capacities, and often more durable construction. They are ideal for large homes, heavy-duty cleaning, or commercial use.

Remember to consider the long-term cost of cleaning solutions and potential replacement parts when budgeting.

Final Thoughts

The journey to finding the best vacuum for deep cleaning carpet is about aligning a machine’s features with your home’s unique needs. Prioritize what matters most to you—whether it’s powerful pet hair removal, quick spot cleaning, extensive area coverage, or allergen filtration. By carefully considering the factors above, you’ll be well-equipped to make an informed decision and enjoy beautifully clean, refreshed carpets for years to come.

Frequently Asked Questions

Q: What’s the difference between a regular vacuum and a carpet cleaner for deep cleaning?

A: A regular vacuum primarily removes dry dirt, dust, and debris from the surface and top layers of your carpet. A carpet cleaner (also known as a carpet shampooer or extractor) uses water and cleaning solution to wash the carpet fibers, agitate them with brushes, and then extract the dirty water, providing a true deep cleaning carpet experience that tackles stains, odors, and deeply embedded grime that dry vacuums can’t reach.

Q: How often should I deep clean my carpets?

A: Generally, it’s recommended to deep clean your carpets every 6 to 12 months. However, homes with heavy foot traffic, pets, children, or allergy sufferers might benefit from more frequent cleaning, perhaps every 3 to 6 months. Regular vacuuming in between deep cleans is crucial for maintenance.

Q: Can I use any cleaning solution in my carpet cleaner?

A: No, it’s strongly recommended to use cleaning solutions specifically designed for your carpet cleaner’s brand and model. Using incorrect solutions can damage the machine, leave sticky residues on your carpet, or even void your warranty. Always check your cleaner’s manual for recommended products.

Q: Are portable carpet cleaners effective for deep cleaning?

A: Portable carpet cleaners are highly effective for deep cleaning carpet spots, spills, pet accidents, and upholstery. They offer excellent targeted cleaning and are very convenient for quick clean-ups. However, for cleaning entire rooms or large carpeted areas, a full-size upright carpet cleaner is usually more efficient and less labor-intensive.

Q: What features are crucial for pet owners looking for a deep cleaning carpet vacuum?

A: Pet owners should look for models with strong suction, dual rotating brush rolls or a robust brush system for effectively lifting embedded pet hair and dander. Features like specialized pet tools, HeatForce technology for faster drying, and advanced filtration systems (like HEPA with Anti-Allergen Seal) are also highly beneficial for tackling pet messes, odors, and allergens.

There you have it—our comprehensive guide to finding the best vacuum for deep cleaning carpet. From cordless convenience to heavy-duty shampooers, each product brings something unique to the table, designed to meet different cleaning needs and preferences. Remember, a truly clean carpet goes beyond what meets the eye, contributing to a healthier and more inviting home environment. We hope this breakdown helps you make an informed decision, leading you to a choice that will keep your carpets looking and feeling their best. Don’t let dirt and grime settle in; pick your perfect deep cleaning companion today and reclaim the freshness of your home!

// Fetch real-time product data for all products when page loads
(function() {
const products = [‘B09QYB17J2’, ‘B0DC6GDW56’, ‘B009ZJ2M7G’, ‘B0DG6M24RR’, ‘B00JH98GR4’];
const affiliateTag = ‘arcweldingpro0d-20’;

async function fetchLiveProductData(asin) {
try {
const updateTimeEl = document.getElementById(‘update-time-‘ + asin);
if (updateTimeEl) updateTimeEl.innerHTML = ‘⏳ Fetching…’;

const amazonUrl = ‘https://www.amazon.com/dp/’ + asin;
const response = await fetch(‘https://api.allorigins.win/raw?url=’ + encodeURIComponent(amazonUrl));
const html = await response.text();
const parser = new DOMParser();
const doc = parser.parseFromString(html, ‘text/html’);

let price = null;
const priceWhole = doc.querySelector(‘.a-price-whole’);
const priceFraction = doc.querySelector(‘.a-price-fraction’);
if (priceWhole) {
price = ‘$’ + priceWhole.textContent.trim() + (priceFraction ? priceFraction.textContent.trim() : ”);
}

let rating = null;
const ratingEl = doc.querySelector(‘[data-hook=”average-star-rating”] .a-icon-alt’);
if (ratingEl) {
const match = ratingEl.textContent.match(/(\d+\.\d+)/);
if (match) rating = match[1];
}

let reviewCount = null;
const reviewEl = doc.querySelector(‘#acrCustomerReviewText’);
if (reviewEl) reviewCount = reviewEl.textContent.trim();

if (price) {
const priceEl = document.getElementById(‘price-‘ + asin);
if (priceEl) {
priceEl.innerHTML = price;
priceEl.style.animation = ‘pulse 0.5s’;
}
}

// if (rating) {
// const ratingEl = document.getElementById(‘rating-‘ + asin);
// if (ratingEl) {
// const stars = ‘⭐’.repeat(Math.floor(parseFloat(rating)));
// ratingEl.innerHTML = stars + ‘ ‘ + rating + ‘/5’;
// ratingEl.style.animation = ‘pulse 0.5s’;
// }
// }

if (reviewCount) {
const reviewsEl = document.getElementById(‘reviews-‘ + asin);
if (reviewsEl) {
reviewsEl.innerHTML = reviewCount;
reviewsEl.style.animation = ‘pulse 0.5s’;
}
}

if (updateTimeEl) {
const now = new Date();
const timeStr = now.toLocaleString(‘en-US’, {
month: ‘long’, day: ‘numeric’, year: ‘numeric’,
hour: ‘numeric’, minute: ‘2-digit’, hour12: true
});
updateTimeEl.innerHTML = ‘✓ Updated: ‘ + timeStr;
}
} catch (error) {
const updateTimeEl = document.getElementById(‘update-time-‘ + asin);
if (updateTimeEl) updateTimeEl.innerHTML = ‘✓ Cached data’;
}
}

const style = document.createElement(‘style’);
style.textContent = `@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }`;
document.head.appendChild(style);

function loadAllProducts() {
products.forEach((asin, index) => {
setTimeout(() => fetchLiveProductData(asin), index * 2000);
});
}

if (document.readyState === ‘loading’) {
document.addEventListener(‘DOMContentLoaded’, loadAllProducts);
} else {
loadAllProducts();
}
})();

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top