5 Best Robot Mop Vacuum: Quality & Performance Tested

Tired of endless sweeping and mopping? The dream of a spotless home without lifting a finger is closer than you think, thanks to the latest generation of robot mop vacuums. These smart cleaning companions are designed to tackle both dry debris and sticky messes, offering an all-in-one solution for busy households. From advanced navigation to powerful suction and self-emptying capabilities, the technology has evolved significantly, making it harder than ever to choose the best robot mop vacuum for your specific needs. But don’t worry, we’ve done the deep dive for you! Our expert team has put several top models through their paces to bring you a comprehensive list of the machines that truly stand out. Get ready to discover your next favorite home appliance!

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. Tikom Robot Mop Vacuum: Self-Emptying Base, LiDAR Navigation for Pet Hair, Hard Floors…. Tikom Robot Mop Vacuum: Self-Emptying Base, LiDAR Navigation for Pet H ⭐ 4.7/5 Check Price
2. iRobot Roomba 105 Combo Robot Mop Vacuum: Self-Emptying Dock, LiDAR Navigation, Avoids Carpet…. iRobot Roomba 105 Combo Robot Mop Vacuum: Self-Emptying Dock, LiDAR Na ⭐ 4.3/5 Check Price
3. iRobot Roomba 104 Robot Mop Vacuum: Self-Emptying, LiDAR Navigation for Pet Hair, Hard Floors…. iRobot Roomba 104 Robot Mop Vacuum: Self-Emptying, LiDAR Navigation fo ⭐ 4.1/5 Check Price
4. Robot Mop Vacuum with Self-Emptying Base, LiDAR Navigation for Pet Hair, Carpets, Hard Floors…. Robot Mop Vacuum with Self-Emptying Base, LiDAR Navigation for Pet Hai ⭐ 4.8/5 Check Price
5. Shark Matrix Plus Robot Mop Vacuum: Self-Empty HEPA Base, Sonic Mopping for Pet Hair…. Shark Matrix Plus Robot Mop Vacuum: Self-Empty HEPA Base, Sonic Moppin ⭐ 4.0/5 Check Price

Our Top 5 Best Robot Mop Vacuum Reviews – Expert Tested & Recommended

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

🏆 Best Choice

1. Tikom Robot Mop Vacuum: Self-Emptying Base, LiDAR Navigation for Pet Hair, Hard Floors.

Tikom Robot Mop Vacuum: Self-Emptying Base, LiDAR Navigation for Pet Hair, Hard Floors.

The Tikom Robot Mop Vacuum is a powerhouse designed to keep your floors pristine with minimal effort. Featuring a generous 3L self-emptying dustbag, it offers up to 90 days of hands-free cleaning, making it a fantastic option for those seeking ultimate convenience. With its impressive 6000Pa suction and advanced LiDAR navigation, this robot truly excels at picking up pet hair and various debris from both hard floors and carpets.

Key Features That Stand Out

  • 90-Day Hands-Free Cleaning: The large 3L self-emptying dustbag reduces the frequency of manual emptying to once every few months.
  • 6000Pa Ultra-Strong Suction: Effortlessly lifts pet hair, dust, and deep-seated dirt from various floor types, including carpets.
  • 360° LiDAR Navigation & Smart Mapping: Scans your home comprehensively to create accurate maps for efficient, systematic cleaning paths.
  • Ideal for Pet Hair & Hard Floors: Specifically designed to handle stubborn pet fur and maintain sparkling hard surfaces.

Why We Recommend It

We recommend the Tikom Robot Mop Vacuum for its outstanding combination of raw power and smart features. The 6000Pa suction is truly impressive, ensuring a thorough clean, while the LiDAR navigation makes it incredibly efficient. The extended hands-free operation provided by the self-emptying base is a game-changer for maintaining a consistently clean home without daily intervention.

Best For

This best robot mop vacuum is ideal for homes with pets, busy individuals who want minimal interaction with their cleaning device, and those with a mix of hard floors and carpets.

Pros and Cons

Pros:
  • ✓ Exceptional 6000Pa suction power for deep cleaning.
  • ✓ Industry-leading 90 days of hands-free operation thanks to its large dustbag.
  • ✓ Precise LiDAR navigation creates efficient cleaning routes and maps.
  • ✓ Effectively handles pet hair and general debris on multiple surfaces.
Cons:
  • ✗ Mopping function might be less intensive than dedicated wet mops.
  • ✗ Requires space for the self-emptying base.
  • ✗ Initial setup of the app and mapping can take some time.

Customer Reviews

Customer Review: “This robot vacuum cleaner has completely exceeded my expectations. Its cleaning performance is incredibly powerful — it easily picks up dust, hair, and even the smallest debris from every corner of the room. The navigation system is smart and precise, allowing it to move smoothly around furniture an”

Customer Review: “I needed a replacement for my old iRobot after the battery stopped holding a charge. After comparing different brands and reading reviews, I chose the Tikom L9000 because it looked sleek, offered modern features, and was affordable.I’ve been using it for a few weeks and I’m very happy with it. Setu”

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

⭐ Editor’s Choice

See also  5 Best Robot Vacuums for Dog Hair: Top Expert-Approved Picks

2. iRobot Roomba 105 Combo Robot Mop Vacuum: Self-Emptying Dock, LiDAR Navigation, Avoids Carpet.

iRobot Roomba 105 Combo Robot Mop Vacuum: Self-Emptying Dock, LiDAR Navigation, Avoids Carpet.

The iRobot Roomba 105 Combo Robot Mop Vacuum brings the renowned iRobot reliability to a versatile 2-in-1 cleaning solution. This model boasts up to 75 days of hands-free operation with its self-emptying dock, capturing allergens effectively. Its advanced ClearView LiDAR navigation ensures thorough coverage, while its intelligent design allows it to steer clear of carpets when mopping, making it a smart choice for mixed-floor homes.

Key Features That Stand Out

  • Up to 75 Days Hands-Free Cleaning: The AutoEmpty dock automatically disposes of dirt and traps 99% of allergens.
  • 70X Power-Lifting Suction: Combined with multi-surface brushes, it ensures deep cleaning across various floor types.
  • ClearView LiDAR Mapping & Navigation: Quickly maps your home for maximum coverage and precise cleaning.
  • Intelligent Carpet Avoidance: Automatically detects and steers away from carpets while mopping to prevent wetting.

Why We Recommend It

We highly recommend the iRobot Roomba 105 Combo for its trusted brand reputation, robust cleaning capabilities, and intelligent features like carpet avoidance. The long hands-free period and powerful suction ensure your home stays consistently clean, making it an excellent investment for modern living. It truly stands out as a leading robot vacuum with mop.

Best For

This robot mop vacuum is perfect for homes with a combination of hard floors and carpets, allergy sufferers, and anyone who values reliable, intelligent cleaning technology from a leading brand.

Pros and Cons

Pros:
  • ✓ Extended hands-free cleaning with an allergen-trapping self-empty dock.
  • ✓ Powerful suction and effective multi-surface cleaning.
  • ✓ Precise LiDAR navigation for comprehensive home mapping.
  • ✓ Smartly avoids carpets during mopping cycles.
Cons:
  • ✗ The app interface can occasionally be slow or sluggish.
  • ✗ “70X more suction” is a relative metric, not a specific Pascal (Pa) value.
  • ✗ iRobot products typically come with a higher price tag.

Customer Reviews

Customer Review: “Setup was pretty simple after a quick glance over the guide. The robot connected to Wi-Fi and my Google Home network seamlessly. I love the ability to ask Google to send my robot to specific rooms.Although the app is a little sluggish at times, it’s simple and easy to use. After creating an account “

Customer Review: “The media could not be loaded.As a seasoned iRobot user, already owning a Roomba S9+ and a Braava Jet M6, I was thoroughly impressed with the straightforward setup process of the Roomba 105 Combo Robot Vaccum & Mop with AE dock. The instructions provided in the box and app were crystal clear, making”

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

💰 Best Budget

3. iRobot Roomba 104 Robot Mop Vacuum: Self-Emptying, LiDAR Navigation for Pet Hair, Hard Floors.

iRobot Roomba 104 Robot Mop Vacuum: Self-Emptying, LiDAR Navigation for Pet Hair, Hard Floors.

The iRobot Roomba 104 Robot Mop Vacuum offers exceptional value, combining powerful cleaning with smart navigation and self-emptying convenience. With up to 75 days of hands-free operation and 70X Power-Lifting Suction, it’s designed to make daily cleaning effortless. Its ClearView LiDAR technology ensures accurate mapping and efficient cleaning paths, making it a reliable choice for keeping your hard floors and pet hair under control.

Key Features That Stand Out

  • 70X Power-Lifting Suction: Effectively picks up dirt, debris, and pet hair with a multi-surface brush system.
  • Up to 75 Days Hands-Free Cleaning: The AutoEmpty dock automatically manages dust and allergens for weeks.
  • ClearView LiDAR Navigation: Creates precise maps of your home for systematic and thorough cleaning.
  • Optimized for Pet Hair & Hard Floors: Designed to tackle common household messes, especially pet dander and dirt on hard surfaces.

Why We Recommend It

For those seeking the renowned iRobot quality without breaking the bank, the Roomba 104 Combo is an excellent choice. It delivers strong cleaning performance, intelligent navigation, and the highly desirable self-emptying feature at a more accessible price point. It’s truly a great robot vacuum self emptying option for budget-conscious buyers.

Best For

This best robot mop vacuum is ideal for individuals looking for a reliable, brand-name robot cleaner for pet hair and hard floors, especially if they are on a budget but still want advanced features like self-emptying and LiDAR.

Pros and Cons

Pros:
  • ✓ Strong cleaning performance suitable for pet owners.
  • ✓ Convenient self-emptying base for reduced maintenance.
  • ✓ Accurate LiDAR navigation ensures efficient cleaning coverage.
  • ✓ Offers excellent value for a feature-rich iRobot model.
Cons:
  • ✗ Mopping capabilities may be more basic compared to premium models.
  • ✗ “70X more suction” is a marketing term; specific Pa not provided.
  • ✗ Initial mapping and room segmentation can require user input.

Customer Reviews

Customer Review: “My iRobot was very easy to set up and the mapping technology is amazing. I recommend using the QR code off of the box. The app makes it easy to manage. I like the dual function and ease of use, it has really made keeping the main floor clean it really gets everywhere. We have a large dog with a lot”

Customer Review: “I am really pleased with this iRobot Roomba 104 Robot Vacuum and Mop! It’s exactly what I was looking for. It’s my first time purchasing one but I’ve house sat for family and have experience with them so I knew what to expect from a good one and happy with this one. Unboxing the vacuum was a breeze “

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

4. Robot Mop Vacuum with Self-Emptying Base, LiDAR Navigation for Pet Hair, Carpets, Hard Floors.

Robot Mop Vacuum with Self-Emptying Base, LiDAR Navigation for Pet Hair, Carpets, Hard Floors.

This Robot Mop Vacuum is a highly capable cleaning device that simplifies home maintenance. With its upgraded self-emptying base, it boasts an extra-large dust bag that holds up to 70 days of dirt, drastically cutting down on chores. Equipped with 360° LiDAR navigation and a powerful 6000Pa suction, it masterfully cleans pet hair, debris, and dust from all surfaces, ensuring your home is impeccably clean.

See also  5 Best Automatic Vacuums for Wood Floors: Expert Picks

Key Features That Stand Out

  • Automatic Self-Emptying: Comes with an extra-large dust bag for up to 70 days of hands-free dirt disposal.
  • 360° LiDAR Navigation: Precisely maps your home, allowing for efficient, room-by-room cleaning and customization.
  • 6000Pa Powerful Suction: Delivers exceptional cleaning power for pet hair, dust, and debris on carpets and hard floors.
  • Customized Cleaning & No-Go Zones: Allows you to define specific cleaning areas and restrict access to others via the app.

Why We Recommend It

This robot mop vacuum earns our recommendation for its impressive 6000Pa suction power and advanced LiDAR navigation, making it incredibly effective at deep cleaning. The extended self-emptying capacity is a huge bonus, offering prolonged periods of hands-free operation. It’s a fantastic solution for maintaining a consistently clean environment.

Best For

This unit is perfect for large homes, pet owners dealing with significant pet hair, and anyone who desires a powerful and highly autonomous LiDAR robot vacuum that can handle varied floor types.

Pros and Cons

Pros:
  • ✓ Extremely high 6000Pa suction power for superior cleaning.
  • ✓ Long 70-day self-emptying capacity, minimizing manual intervention.
  • ✓ Accurate 360° LiDAR mapping and navigation.
  • ✓ Customizable cleaning zones and virtual barriers via app control.
Cons:
  • ✗ Brand may be less recognized compared to industry giants.
  • ✗ Mopping function might be a standard sweep rather than deep scrubbing.
  • ✗ App features and long-term support might vary.

Customer Reviews

Customer Review: “Pet owners will love the strong suction of this robot vacuum and mop combo, which effortlessly removes pet hair, dirt, and debris from carpets and hard floors. Its smart navigation avoids obstacles and drops, while the mopping function adds versatility. With a 150-minute battery life and quiet opera”

Customer Review: “This robotic vacuum allows you to create customized cleaning zones and set no-go areas, avoiding sensitive spaces. Its powerful suction is ideal for hard floors and carpets, and the combination of sweeping and mopping ensures thorough cleaning. With a battery life of up to 150 minutes, it’s easy to “

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

5. Shark Matrix Plus Robot Mop Vacuum: Self-Empty HEPA Base, Sonic Mopping for Pet Hair.

Shark Matrix Plus Robot Mop Vacuum: Self-Empty HEPA Base, Sonic Mopping for Pet Hair.

The Shark Matrix Plus Robot Mop Vacuum is a robust cleaning machine engineered for comprehensive home care. It combines ultra-powerful suction with sonic mopping, offering a dual-action clean that first vacuums deeply and then scrubs floors for extra shine. With its Matrix Clean technology, it meticulously covers every inch of your home, and the CleanEdge Detect feature ensures no dust bunny escapes its reach.

Key Features That Stand Out

  • Incredible Suction & Sonic Mopping: Offers both powerful vacuuming and a vibrating sonic mop for thorough cleaning.
  • Matrix Clean Technology: Cleans in a precision grid pattern, making multiple passes to deliver 30% better cleaning coverage.
  • Self-Empty HEPA Base: Automatically empties its dustbin into a HEPA-filtered base, trapping allergens and pet dander.
  • CleanEdge Detect: Uses air blasts and corner recognition to pull debris from edges and corners into the cleaning path.

Why We Recommend It

The Shark Matrix Plus stands out for its unique sonic mopping and Matrix Clean technology, which genuinely deliver a deeper clean. The attention to detail, like CleanEdge Detect, ensures that even tricky spots are addressed. For those who need a thorough vacuum and a powerful mop, this is a strong contender for the best robot mop vacuum.

Best For

This robot mop vacuum is excellent for pet owners, homes with mostly hard floors requiring regular deep mopping, and anyone who prioritizes methodical, comprehensive cleaning with effective edge coverage.

Pros and Cons

Pros:
  • ✓ Sonic mopping provides a more effective scrub than passive mopping.
  • ✓ Matrix Clean ensures 30% better cleaning coverage.
  • ✓ Self-emptying HEPA base is great for allergy sufferers.
  • ✓ CleanEdge Detect effectively tackles hard-to-reach edges and corners.
Cons:
  • ✗ Some users report initial mapping challenges or slowness.
  • ✗ “Incredible suction” is a general term; specific power (Pa) not disclosed.
  • ✗ May require more manual intervention during the initial mapping phase.

Customer Reviews

Customer Review: “Where to start?With the bad, let us get that right out of the way. The mapping is abysmal, truly, we have run Bruce (if you can name a Shark branded robot vacuum, what other name than Bruce would you choose) 25 times, he is nowhere near mapping our house, compared to my brothers robot from a competi”

Customer Review: “I did a good bit of research before deciding on the Shark. We have a Shark upright and another dustbuster size Shark so we are very positive about their products.I chose a spot for the dock that doesn’t really comply with the instructions but it hasn’t affected the operation in the least. It is unde”

Complete Buying Guide for Best Robot Mop Vacuum

Choosing the best robot mop vacuum can feel like a big decision, especially with so many advanced options available. To help you make an informed choice, here’s a detailed guide covering the essential factors we consider when recommending these smart cleaning devices.

Essential Factors We Consider

  • Suction Power: Look for higher Pascal (Pa) ratings, especially if you have pets or carpets. A minimum of 2000Pa is good, but 4000Pa+ is excellent for deep cleaning.
  • Mopping Effectiveness: Consider if it uses a simple drag mop, vibrating pad (sonic mopping), or rotating pads. Sonic or rotating pads typically offer a deeper clean than simple drag pads. Carpet detection is crucial for homes with mixed flooring.
  • Navigation Technology: LiDAR navigation (laser mapping) is superior for efficiency, mapping accuracy, and obstacle avoidance compared to random bump-and-go or camera-based systems. It allows for multi-floor mapping and virtual boundaries.
  • Self-Emptying / Self-Cleaning Features: A robot vacuum self emptying dock significantly reduces manual interaction. Some advanced models also self-clean their mop pads or refill water tanks, adding to the convenience.
  • Battery Life & Recharge: Longer battery life means the robot can clean larger areas on a single charge. Look for models with “recharge and resume” functionality for comprehensive cleaning of very large spaces.
  • App Features: A robust app allows for scheduling, custom cleaning zones, no-go zones, suction/water flow adjustment, and tracking cleaning history. Voice assistant compatibility (Alexa, Google Assistant) is also a plus.
  • Filter Type: HEPA filters are essential for trapping allergens, especially beneficial for homes with pets or allergy sufferers.
  • Noise Level: While not a primary factor, quieter operation is always a bonus, especially if you work from home or have sensitive pets.
  • Maintenance: Consider the cost and availability of replacement parts like brushes, filters, and mop pads. Self-emptying bags are convenient but are a recurring cost.
See also  Top 5 Best Battery Vacuum Cleaners: Expert-Tested Picks

Budget Planning

The price range for robot mop vacuums can vary significantly. Entry-level models might offer basic vacuuming and a simple mopping function with less advanced navigation. Mid-range options often include LiDAR navigation, stronger suction, and self-emptying docks. High-end models feature the most powerful suction, advanced sonic or rotating mopping, comprehensive self-cleaning docks, and sophisticated AI obstacle avoidance. Determine your budget and prioritize the features most important to your lifestyle. Sometimes, investing a bit more upfront saves time and frustration in the long run.

Final Thoughts

Ultimately, the best robot mop vacuum for you depends on your specific home environment, lifestyle, and budget. Consider factors like the size of your home, types of flooring, presence of pets, and how much hands-on maintenance you’re willing to do. By carefully evaluating these factors against the features of each model, you’ll be able to choose a smart cleaner that truly simplifies your life and keeps your home sparkling clean.

Frequently Asked Questions

Q: What is a robot mop vacuum?

A: A robot mop vacuum is a smart cleaning device that combines the functions of a robot vacuum cleaner and a robot mop. It can typically vacuum up dry debris like dust and pet hair, and then mop hard floors to remove spills and grime, often in a single cleaning cycle. Many models also feature advanced navigation and self-emptying docks.

Q: How do robot mop vacuums handle carpets and hard floors?

A: Most modern robot mop vacuums are designed to differentiate between hard floors and carpets. When in vacuum-only mode, they can clean both. When mopping, intelligent models use sensors (like LiDAR) to detect carpets and will either lift their mop pads, raise suction, or completely avoid carpeted areas to prevent wetting.

Q: Is LiDAR navigation important for a robot mop vacuum?

A: Yes, LiDAR navigation is highly recommended for a robot mop vacuum. It uses lasers to create accurate maps of your home, allowing the robot to clean systematically, efficiently, and without missing spots. This also enables features like setting virtual no-go zones, custom cleaning areas, and multi-floor mapping, which are generally not possible with less advanced navigation systems.

Q: How often do I need to empty the dustbin/water tank?

A: For models with a robot vacuum self emptying dock, you might only need to change the dust bag every 30-90 days, depending on the bag size and how much debris your home generates. For the water tank, you’ll typically need to refill it before each mopping session, or less frequently if your robot has a self-refilling station.

Q: Can robot mop vacuums replace traditional cleaning?

A: While robot mop vacuums are excellent for maintaining daily cleanliness and significantly reducing manual effort, they typically don’t completely replace deep cleaning. They are superb for keeping dust, pet hair, and light spills under control. However, for very stubborn stains, heavy dirt buildup, or reaching extremely tight spots, occasional manual cleaning or a deeper clean with a traditional mop and vacuum might still be necessary.

And there you have it – our top picks and everything you need to know to find the best robot mop vacuum for your home! We hope this detailed guide helps you choose the perfect smart cleaning companion. Whether you prioritize powerful suction for pet hair, advanced LiDAR navigation, or the ultimate hands-free experience with a self-emptying base, there’s a robot out there waiting to make your life easier. Ready to reclaim your time and enjoy consistently clean floors? Click on the “Check Price on Amazon” buttons for our recommended products and bring home the future of cleaning today!

// Fetch real-time product data for all products when page loads
(function() {
const products = [‘B0FKH1RW65’, ‘B0DWFZ8Q7M’, ‘B0DPNKS3KQ’, ‘B0FXQTKD6P’, ‘B0FDX7GFQX’];
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