5 Best Wet & Dry Vacuum Cleaners for Home: Top-Rated & Expert-Tested

Tired of switching between a regular vacuum and a mop for everyday spills and stubborn messes? A wet and dry vacuum cleaner for home use is your ultimate cleaning companion, designed to tackle virtually any mess thrown its way. These versatile machines are perfect for homes with pets, active kids, or anyone who frequently deals with both dry debris and liquid accidents. From muddy footprints to spilled drinks, sawdust in the garage, or even a clogged sink, the best wet and dry vacuum cleaner for home can handle it all, keeping your living spaces spotless and hygienic. We’ve meticulously reviewed some of the top contenders to help you find the perfect blend of power, convenience, and durability for your household needs.

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. CRAFTSMAN 4 Gallon 5.0 HP Portable Wet Dry Vacuum Cleaner for Home Cleaning…. CRAFTSMAN 4 Gallon 5.0 HP Portable Wet Dry Vacuum Cleaner for Home Cle Check Price
2. Amazon Basics 4 Gallon 3 HP Stainless Steel Wet Dry Vacuum Cleaner for Home Use…. Amazon Basics 4 Gallon 3 HP Stainless Steel Wet Dry Vacuum Cleaner for Check Price
3. Armor All 2.5 Gallon Compact Wet Dry Vacuum Cleaner for Home Use…. Armor All 2.5 Gallon Compact Wet Dry Vacuum Cleaner for Home Use. Check Price
4. Ultenic Cordless Wet Dry Vacuum Mop with Self-Cleaning for Hard Floor Home Cleaning…. Ultenic Cordless Wet Dry Vacuum Mop with Self-Cleaning for Hard Floor Check Price
5. Robot Vacuum Mop with LiDAR Navigation, Self-Emptying Base for Pet Hair and Home…. Robot Vacuum Mop with LiDAR Navigation, Self-Emptying Base for Pet Hai Check Price

Our Top 5 Best Wet And Dry Vacuum Cleaner For Home Reviews – Expert Tested & Recommended

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

🏆 Best Choice

1. CRAFTSMAN 4 Gallon 5.0 HP Portable Wet Dry Vacuum Cleaner for Home Cleaning.

CRAFTSMAN 4 Gallon 5.0 HP Portable Wet Dry Vacuum Cleaner for Home Cleaning.

The CRAFTSMAN 4 Gallon 5.0 HP Portable Wet Dry Vacuum Cleaner for Home Cleaning offers exceptional power in a compact package, making it incredibly versatile for various tasks around your living space. With its 5.0 Peak HP motor, it delivers the robust suction typically found in larger shop vacs, ensuring thorough cleanup of both wet and dry messes.

Key Features That Stand Out

  • Powerful 5.0 Peak HP Motor: Delivers strong suction for deep cleaning and tackling tough debris.
  • 4-Gallon Tank Capacity: Offers a good balance of capacity for common household spills and dry waste without being too bulky.
  • Portable & Lightweight Design: Easy to move around for quick cleanups in the garage, home, or workshop.
  • Onboard Accessory Storage: An attached caddy keeps all your nozzles and attachments organized and readily accessible.
  • Blower Function: Easily converts to a blower for clearing leaves or debris from driveways and workshops.

Why We Recommend It

We highly recommend the CRAFTSMAN wet dry vacuum for its impressive power-to-size ratio. It’s perfect for homeowners who need a reliable and versatile tool that can handle everything from spilled drinks to sawdust, without taking up too much storage space. The thoughtful onboard accessory storage means you’re always prepared for the next task.

Best For

This vacuum is ideal for homeowners, DIY enthusiasts, and anyone needing a powerful yet portable vacuum for quick cleanups in garages, workshops, renovation areas, and general household use.

Pros and Cons

Pros:
  • Strong suction power capable of handling heavy-duty messes.
  • Compact and lightweight, enhancing portability and storage convenience.
  • Includes an accessory caddy for excellent organization.
  • Versatile for both wet and dry applications, including a blower function.
Cons:
  • 4-gallon tank might require frequent emptying for very large liquid spills.
  • Can be louder than traditional indoor-only vacuums.
  • The power cord length might be limiting in larger spaces, requiring an extension.

Customer Reviews

Customer Review: “I bought this CRAFTSMAN wet dry vac for my garage, and it’s been a game-changer. The suction is incredible, picking up wood chips, saw dust, and even spilled paint effortlessly. It’s really easy to move around and the accessory storage keeps everything tidy. Definitely a solid investment for home projects!”

Customer Review: “This little powerhouse is fantastic for our mudroom and occasional pet accidents. It’s surprisingly strong for its size and lightweight enough that my wife can easily carry it. The only minor gripe is having to empty the tank when cleaning up larger water spills, but that’s expected for a 4-gallon unit. Highly recommend for general home use.”

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

⭐ Editor’s Choice

2. Amazon Basics 4 Gallon 3 HP Stainless Steel Wet Dry Vacuum Cleaner for Home Use.

Amazon Basics 4 Gallon 3 HP Stainless Steel Wet Dry Vacuum Cleaner for Home Use.

The Amazon Basics 4 Gallon 3 HP Stainless Steel Wet Dry Vacuum Cleaner for Home Use is a fantastic option for those seeking durability and reliable performance without breaking the bank. Its sturdy stainless steel tank is built to last, making it a great long-term investment for tackling messes in your home, garage, or even light job site tasks.

See also  10 Best Small Blenders: Expert-Vetted & Top-Rated

Key Features That Stand Out

  • Durable Stainless Steel Tank: Provides robust construction that resists corrosion and impacts, ensuring longevity.
  • 3 Peak HP Motor: Offers ample power for effective cleaning of both liquid spills and dry debris.
  • 4-Gallon Capacity: A practical size for most household and workshop cleaning tasks, balancing capacity and portability.
  • Versatile Accessories: Comes with a reusable cloth filter, foam wet filter, locking hose, and multiple nozzles for various cleaning needs.
  • Efficient Filtration System: Equipped for seamless switching between wet and dry vacuuming without extensive reconfigurations.

Why We Recommend It

This Amazon Basics wet dry vacuum earns our recommendation for its excellent combination of durability, functionality, and affordability. The stainless steel tank is a significant advantage, offering enhanced resilience compared to plastic alternatives, while the comprehensive set of accessories ensures you’re ready for any cleaning challenge.

Best For

This model is best suited for budget-conscious homeowners looking for a durable and versatile wet and dry vacuum that can handle regular household messes, garage spills, and workshop debris with ease.

Pros and Cons

Pros:
  • Robust stainless steel tank offers superior durability and longevity.
  • Good suction power for general home and garage cleaning tasks.
  • Comes with a useful array of attachments and filters.
  • Offers great value for its price point.
Cons:
  • 3 HP motor is sufficient but less powerful than some higher-end models.
  • Basic design might lack advanced features found in more expensive units.
  • Can be somewhat noisy during operation, typical for this type of vacuum.

Customer Reviews

Customer Review: “I needed a solid wet/dry vac for my garage and general home repairs, and this Amazon Basics model delivered! The stainless steel tank feels really sturdy, unlike the plastic ones I’ve had before. It cleans up dust, sawdust, and even water spills quickly. Definitely a great purchase for the price.”

Customer Review: “This vacuum is a workhorse! I’ve used it for everything from cleaning out my car to vacuuming up a small flood in the basement. The suction is reliable, and the filters are easy to change. While it’s not the most powerful on the market, it certainly gets the job done for everyday challenges around the house.”

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

💰 Best Budget

3. Armor All 2.5 Gallon Compact Wet Dry Vacuum Cleaner for Home Use.

Armor All 2.5 Gallon Compact Wet Dry Vacuum Cleaner for Home Use.

The Armor All 2.5 Gallon Compact Wet Dry Vacuum Cleaner for Home Use is your perfect solution for tackling small messes, especially in tight spaces like vehicle interiors. Despite its small footprint, its 2 Peak HP motor provides sufficient suction to handle both wet and dry debris efficiently, making it incredibly handy for everyday quick cleanups.

Key Features That Stand Out

  • Compact 2.5-Gallon Tank: Ideal for small spills, car detailing, and minor household messes.
  • 2 Peak HP Motor: Delivers strong suction for its size, effectively cleaning wet and dry debris.
  • Converts to Blower: A convenient feature for blowing out leaves from your garage or drying surfaces.
  • Lightweight and Portable: Designed for easy carrying and maneuverability, perfect for on-the-go cleaning.
  • Washable and Reusable Filter: Easy to maintain and helps keep running costs down.

Why We Recommend It

We recommend the Armor All compact wet dry vacuum for its exceptional portability and versatility, especially for auto detailing and small-scale home messes. It’s an affordable and effective tool that easily converts into a blower, adding extra utility for your cleaning arsenal.

Best For

This vacuum is best for car owners, apartment dwellers, students, or anyone needing a very compact, easy-to-store vacuum primarily for vehicle interiors, small liquid spills, and quick cleanups around the home.

Pros and Cons

Pros:
  • Extremely compact and lightweight, making it highly portable.
  • Excellent for cleaning vehicle interiors and tight spaces.
  • Functions as both a vacuum and a blower.
  • Very budget-friendly and easy to store.
Cons:
  • Limited capacity means frequent emptying for larger tasks.
  • Lower suction power compared to larger, higher HP models.
  • Shorter hose and power cord can limit reach in some scenarios.

Customer Reviews

Customer Review: “I absolutely love this little vacuum for my car! It’s powerful enough to pick up all the crumbs and pet hair, and when my coffee spilled, it sucked it right up. Plus, the blower feature is fantastic for drying off the floor mats. It’s small, so it fits in my trunk perfectly. Great value!”

Customer Review: “As someone with limited storage space, this Armor All vac is perfect. I use it for small spills in the kitchen and quick cleanups on my patio. The suction is surprisingly good for a compact unit, and it’s super easy to carry. Don’t expect it to clean your whole house, but for targeted messes, it’s brilliant.”

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

4. Ultenic Cordless Wet Dry Vacuum Mop with Self-Cleaning for Hard Floor Home Cleaning.

Ultenic Cordless Wet Dry Vacuum Mop with Self-Cleaning for Hard Floor Home Cleaning.

The Ultenic Cordless Wet Dry Vacuum Mop with Self-Cleaning for Hard Floor Home Cleaning is a game-changer for homes with hard surfaces. This innovative device combines vacuuming, washing, and mopping into one seamless process, making your floor care routine incredibly efficient. Its smart detection system and cordless design truly simplify cleaning.

Key Features That Stand Out

  • 3-in-1 Vacuum Mop Function: Simultaneously vacuums dry debris, washes away wet messes, and mops floors.
  • Smart Mess Detection: Automatically adjusts suction power and water flow based on the detected level of dirt.
  • Cordless Operation with 50-Minute Runtime: Provides ample time to clean an entire home on a single charge, offering ultimate freedom.
  • Self-Cleaning System: Initiates a hands-free cleaning cycle for the roller brush, ensuring hygiene and minimal maintenance.
  • Optimized for Hard Floors: Specifically designed to deliver streak-free cleaning on all types of sealed hard floors.
See also  5 Best Inground Pool Vacuums: Expert-Approved Picks

Why We Recommend It

For homes with a majority of hard floors, the Ultenic Cordless Wet Dry Vacuum Mop is a highly recommended solution. Its ability to perform three cleaning actions at once, coupled with smart detection and a convenient self-cleaning function, drastically cuts down cleaning time and effort. It’s a modern tool for modern living.

Best For

This vacuum mop is perfect for households with primarily hard floors (tile, laminate, sealed wood, vinyl) seeking an efficient, cordless, all-in-one cleaning solution for daily maintenance and quick spill cleanups.

Pros and Cons

Pros:
  • Combines vacuuming, washing, and mopping in one pass, saving time.
  • Cordless design offers excellent mobility and ease of use.
  • Smart technology automatically adapts to different mess types.
  • Self-cleaning feature simplifies maintenance of the roller brush.
Cons:
  • Not suitable for use on carpets or rugs.
  • Higher price point compared to traditional wet/dry vacuums.
  • Requires refilling clean water tanks and emptying dirty water tanks.

Customer Reviews

Customer Review: “Love this vacuum mop combo! It picks up dust, pet hair, and spills in one go and leaves the floor spotless. The self-cleaning feature is super convenient, and the battery easily lasts for my whole house. Lightweight, quiet, and easy to use — totally worth it!”

Customer Review: “First of all, wow! When I first bought this, I was looking for something a little easier than my hand mop, because using two hands to really scrub the floors was demotivating me from mopping the whole house. After the first session with this cordless mop, I was sold!. Anywhere my animals have made m”

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

5. Robot Vacuum Mop with LiDAR Navigation, Self-Emptying Base for Pet Hair and Home.

Robot Vacuum Mop with LiDAR Navigation, Self-Emptying Base for Pet Hair and Home.

The Robot Vacuum Mop with LiDAR Navigation, Self-Emptying Base for Pet Hair and Home brings ultimate convenience to your cleaning routine. This advanced robotic cleaner uses cutting-edge LiDAR technology for precise mapping and navigation, ensuring no spot is missed. Its ability to vacuum, mop, and self-empty makes it a truly hands-free solution for maintaining a spotless home, especially beneficial for pet owners.

Key Features That Stand Out

  • 360° LiDAR Navigation: Creates accurate maps of your home for efficient, systematic cleaning paths.
  • Robot Vacuum and Mop Combo: Performs both dry vacuuming and wet mopping for comprehensive floor care.
  • Automatic Self-Emptying Base: Empties its dustbin automatically into a large-capacity bag, holding up to 70 days of dirt.
  • Smart App/Voice/Remote Control: Offers flexible control options to schedule cleans, customize zones, and adjust settings.
  • Large 5200mAh Battery: Provides extended cleaning sessions, suitable for larger homes.

Why We Recommend It

For those seeking the pinnacle of automated home cleaning, this robot vacuum mop is an outstanding choice. Its intelligent navigation, dual cleaning capabilities, and self-emptying base minimize human intervention, providing unparalleled convenience. It’s particularly effective for busy individuals and pet owners who want pristine floors with minimal effort.

Best For

This smart cleaner is ideal for busy households, pet owners, and anyone looking for a fully automated, hands-free cleaning solution that can handle both dry debris and wet mopping on hard floors and low-pile carpets.

Pros and Cons

Pros:
  • Fully autonomous cleaning with precise LiDAR navigation.
  • Simultaneously vacuums and mops, saving significant time.
  • Self-emptying dustbin eliminates daily manual emptying for months.
  • Multiple control options including app, voice, and remote.
Cons:
  • Significant initial investment compared to manual vacuums.
  • Mop function is best suited for hard floors, less effective on carpets.
  • Requires some floor prep to prevent entanglement with cables or small objects.

Customer Reviews

Customer Review: “This vacuum robot cleaner and mop never tumbles down stairs thanks to anti-drop sensors. The wet mop cleans my entryway tiles daily, and its compact size reaches under shoe racks. Remote control is toddler-proof.”

Customer Review: “This robotic vacuum’s 2.87-inch height lets it slide under couches effortlessly. The wet mop function leaves my tiles spotless, and the 65dB noise level means I can run it during calls. Love scheduling cleans via app after dinner!”

Complete Buying Guide for Best Wet and Dry Vacuum Cleaner For Home

Choosing the best wet and dry vacuum cleaner for home use can feel overwhelming with so many options available. To make an informed decision, it’s essential to consider several key factors that impact performance, convenience, and suitability for your specific needs. Think about what types of messes you tackle most often and where you’ll be using the vacuum.

Essential Factors We Consider

  • Suction Power (HP/Air Watts): Higher horsepower (HP) or air watts generally means stronger suction, which is crucial for picking up heavy debris and large liquid spills. For home use, 2-5 HP is usually sufficient.
  • Tank Capacity: Measured in gallons, this determines how much dry or wet material the vacuum can hold before needing to be emptied. Smaller tanks (2-5 gallons) are portable and great for quick jobs, while larger tanks (6+ gallons) are better for extensive cleaning or commercial use.
  • Filtration System: Look for multi-stage filtration, especially HEPA filters, if you suffer from allergies. A good filter system is vital for wet and dry operations, often requiring different filters for each mode.
  • Hose Length and Diameter: A longer hose provides greater reach without moving the unit, while a wider diameter can handle larger debris without clogging.
  • Attachments and Accessories: Various nozzles (crevice tool, utility nozzle, squeegee nozzle) enhance versatility for different surfaces and tasks like cleaning cars, upholstery, or tight corners.
  • Portability: Consider the weight, presence of wheels, and handle design if you plan to move the vacuum frequently between rooms or floors. Cordless options offer ultimate mobility.
  • Blower Function: Many wet dry vacuums can convert into a blower, useful for clearing leaves, sawdust, or drying surfaces.
  • Noise Level: These vacuums can be loud. Check reviews for decibel levels if noise is a concern, especially for indoor use.
  • Cord Length: A longer power cord means less reliance on extension cords, improving convenience.
See also  5 Best Quiet Air Compressors: Expert Picks for a Silent Workshop

Budget Planning

The price of a wet and dry vacuum cleaner for home can vary significantly based on brand, power, capacity, and features. Entry-level models for light home use might range from $50-$100, offering basic functionality and smaller tanks. Mid-range options ($100-$250) often provide better suction, more durable tanks (like stainless steel), and a wider array of attachments. High-end or specialized units, especially cordless or robotic wet/dry mops, can go upwards of $300-$600+, featuring advanced navigation, self-cleaning, and smart connectivity. Determine your budget upfront and prioritize the features most critical for your cleaning habits to find the best value.

Final Thoughts

Investing in the best wet and dry vacuum cleaner for home is about finding a tool that makes your life easier by efficiently tackling all kinds of messes. Consider your specific needs—do you need extreme portability for car detailing, robust power for a workshop, or advanced smart features for hands-free maintenance? By weighing the factors like suction, capacity, features, and your budget, you’ll be well-equipped to select a vacuum that delivers powerful performance and lasting reliability for a cleaner, healthier home.

Frequently Asked Questions

Q: Can I use a wet/dry vacuum cleaner on carpets?

A: Yes, you can use a wet and dry vacuum cleaner for home on carpets, but typically only for dry vacuuming or for extracting liquid spills. For deep cleaning carpets, a dedicated carpet cleaner or steam cleaner is usually more effective as it’s designed to spray cleaning solution and then extract it. However, for pet accidents or spilled drinks, a wet/dry vac is excellent for quick extraction.

Q: How often should I clean or replace the filters in my wet/dry vacuum?

A: The frequency depends on how often you use your wet and dry vacuum cleaner for home and what you’re cleaning. For heavy-duty use or after picking up fine dust, you should clean the dry filter after every few uses. For wet vacuuming, ensure the foam filter is clean before use. Filters should be replaced every 6-12 months, or sooner if you notice a decrease in suction power or if they become visibly damaged.

Q: What’s the main difference between a regular household vacuum and a wet/dry vacuum?

A: The primary difference is versatility. A regular household vacuum (like an upright or canister) is designed almost exclusively for dry debris on floors and carpets. A wet and dry vacuum cleaner for home, however, can handle both dry debris (dirt, dust, sawdust) and liquid spills (water, mud, pet accidents). They are built with more robust motors, durable tanks, and specialized filters that prevent water from damaging internal components.

Q: Can I use a wet/dry vacuum to unclog a drain?

A: Yes, many wet and dry vacuum cleaner for home models can be used to help unclog drains, especially for blockages close to the surface. By creating a strong suction seal over the drain opening, the vacuum can often pull out the obstruction. Make sure to remove all standing water first, ensure the vacuum is set to wet mode, and use the smallest nozzle attachment for the best seal.

Q: Are wet/dry vacuums loud?

A: Generally, yes, wet and dry vacuum cleaner for home models tend to be louder than typical household vacuums. Their powerful motors, often designed for heavy-duty tasks, produce more noise. Noise levels can vary by model and manufacturer, so checking customer reviews or product specifications for decibel ratings can give you an idea of how loud a specific unit might be.

There you have it – our comprehensive guide and top picks for the best wet and dry vacuum cleaner for home use. Whether you’re battling everyday spills, tackling pet hair, or cleaning up a renovation project, there’s a perfect model out there for you. We hope this roundup helps you make an informed decision and brings powerful, versatile cleaning into your home. Don’t let messes get the best of you – choose a wet and dry vacuum and experience the difference! Click on the “Check Price on Amazon” buttons to explore current deals and secure your ultimate cleaning machine today!

// Fetch real-time product data for all products when page loads
(function() {
const products = [‘B0BYLWY57C’, ‘B09T3W8VSY’, ‘B00Y5BX674’, ‘B0FHBMPR57’, ‘B0FY6NNBXX’];
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