5 Best Vacuum for Cat Hair: Expert Picks for a Fur-Free Home

As a devoted cat parent, you know the joy and companionship felines bring into our lives. But let’s be honest, you also know the battle against shedding. Cat hair can quickly accumulate on carpets, hardwood floors, furniture, and even clothes, becoming a constant cleaning challenge. Finding the best vacuum for cat hair isn’t just about cleaning; it’s about reclaiming your home from the furry tumbleweeds and maintaining a healthy, allergen-free environment. A powerful, specialized vacuum can make all the difference, transforming a dreaded chore into a manageable task. We’ve put together a list of top-performing pet hair vacuums designed to tackle even the most stubborn cat hair, helping you keep your home spotless.

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. Bissell CleanView Swivel Upright Bagless Vacuum for Powerful Pet Hair Pickup and Specialized Tools…. Bissell CleanView Swivel Upright Bagless Vacuum for Powerful Pet Hair ⭐ 4.5/5 Check Price
2. BISSELL Pet Hair Eraser Cordless Hand Vacuum for Home and Auto Cat Hair Cleanup…. BISSELL Pet Hair Eraser Cordless Hand Vacuum for Home and Auto Cat Hai ⭐ 4.5/5 Check Price
3. Shark Navigator Lift-Away Upright Vacuum with HEPA Filter for Pet Hair on All Floors…. Shark Navigator Lift-Away Upright Vacuum with HEPA Filter for Pet Hair ⭐ 4.4/5 Check Price
4. Bissell Pet Hair Eraser Allergen Lift-Off Vacuum with HEPA Filter and Tangle-Free Brush Roll…. Bissell Pet Hair Eraser Allergen Lift-Off Vacuum with HEPA Filter and ⭐ 4.5/5 Check Price
5. Shark ZU102 Rotator Pet Upright Vacuum with PowerFins HairPro & Odor Neutralizer Technology, Char…… Shark ZU102 Rotator Pet Upright Vacuum with PowerFins HairPro & Odor N ⭐ 4.4/5 Check Price

Our Top 5 Best Vacuum For Cat Hair Reviews – Expert Tested & Recommended

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

πŸ† Best Choice

1. Bissell CleanView Swivel Upright Bagless Vacuum for Powerful Pet Hair Pickup and Specialized Tools.

Bissell CleanView Swivel Upright Bagless Vacuum for Powerful Pet Hair Pickup and Specialized Tools

The Bissell CleanView Swivel Upright Bagless Vacuum is a powerhouse for tackling persistent cat hair. Its design focuses on deep cleaning and maneuverability, making it a favorite among pet owners. This vacuum combines strong suction with specialized tools to ensure no pet hair is left behind, whether on carpets or hard floors. Plus, every purchase helps support BISSELL Pet Foundation, which is a wonderful bonus for animal lovers.

Key Features That Stand Out

  • βœ“ Swivel Steering: Effortlessly navigates around furniture and obstacles for complete coverage.
  • βœ“ Triple Action Brush Roll: Designed to loosen, lift, and remove embedded pet hair from various surfaces.
  • βœ“ Specialized Pet Tools: Includes accessories like a Pet TurboBrush Tool for upholstery and stairs.
  • βœ“ Bagless Design: Easy-to-empty dirt tank means no ongoing bag purchases and quick disposal of pet hair.

Why We Recommend It

We highly recommend the Bissell CleanView Swivel for its exceptional suction power and pet-specific features. The swivel steering is a game-changer for homes with lots of furniture, allowing you to clean every nook and cranny. Its ability to effectively remove embedded cat hair makes it an indispensable tool for maintaining a hair-free home, and the charitable aspect is a great incentive.

Best For

This vacuum is ideal for cat owners with a mix of carpeted and hard floors who need a powerful, easy-to-maneuver upright vacuum for regular deep cleaning.

Pros and Cons

Pros:
  • Excellent suction power for deep cleaning pet hair.
  • Swivel steering enhances maneuverability around obstacles.
  • Triple Action Brush Roll is effective on embedded hair.
  • Bagless system is convenient and cost-effective.
Cons:
  • Can be a bit heavy for some users.
  • May be inconvenient for cleaning under very low furniture.
  • Corded operation requires plugging and unplugging.

Customer Reviews

Customer Review: This vacuum cleaner is really good β€” the suction power is excellent. It picks up hair, pet fur, dust, and even crumbs very well. The only downside is that it’s a bit inconvenient to use under the bed or couch, and it’s slightly heavy. Overall, though, it works great!😍

Customer Review: We got this as a gift to a student headed off to college. They said it works very well, is light, picks up the dirt, and is easy to use.

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

⭐ Editor’s Choice

2. BISSELL Pet Hair Eraser Cordless Hand Vacuum for Home and Auto Cat Hair Cleanup.

BISSELL Pet Hair Eraser Cordless Hand Vacuum for Home and Auto Cat Hair Cleanup

For quick cleanups and getting into tight spaces, the BISSELL Pet Hair Eraser Cordless Hand Vacuum is an absolute lifesaver. This compact yet powerful tool is specifically engineered to target embedded dirt and cat hair on upholstery, stairs, and even in your car. Its cordless design offers unparalleled convenience, allowing you to tackle messes as soon as they happen without fumbling for an outlet. It’s a fantastic supplementary vacuum for any cat owner.

See also  5 Best Robot Mop & Vacuum: Expert-Tested Picks for Clean Homes

Key Features That Stand Out

  • βœ“ Motorized Brush Tool: Designed to aggressively remove embedded pet hair and dirt from various surfaces.
  • βœ“ Cordless Convenience: Powered by a 14V lithium-ion battery for flexible cleaning anywhere.
  • βœ“ Lightweight & Compact: Easy to carry and maneuver for spot cleaning and hard-to-reach areas.
  • βœ“ Triple Level Filtration: Helps trap more dust and pet dander, improving air quality.

Why We Recommend It

This handheld cat hair vacuum is a must-have for targeted cleaning. Its motorized brush is incredibly effective at lifting hair from fabric, which is a common challenge for cat owners. The cordless freedom means you’ll actually use it for those daily touch-ups that keep your home looking its best, making it an excellent complement to a larger upright vacuum.

Best For

Perfect for quick spot cleanups, furniture, car interiors, stairs, and any other areas where cat hair accumulates in hard-to-reach spots.

Pros and Cons

Pros:
  • Excellent for quick, targeted pet hair removal.
  • Cordless design offers maximum flexibility and convenience.
  • Motorized brush tool is highly effective on upholstery.
  • Lightweight and easy to store.
Cons:
  • Battery life is limited for extended cleaning sessions.
  • Suction power is less than a full-sized upright vacuum.
  • Small dust bin requires frequent emptying.

Customer Reviews

Customer Review: The BISSELL Pet Hair Eraser Cordless Hand Vacuum has been a big help around my home and car. It’s lightweight, easy to maneuver, and the battery lasts long enough to clean furniture and small messes without constantly recharging. The suction is strong for a handheld, and it does a great job pulling.

Customer Review: Works good. Picks up all that hair. I use it for quick crumb clean up too. Only thing, the charge doesnt last as long as previous ones Ive bought and it takes longer to charge. Still, I like it.

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

πŸ’° Best Budget

3. Shark Navigator Lift-Away Upright Vacuum with HEPA Filter for Pet Hair on All Floors.

Shark Navigator Lift-Away Upright Vacuum with HEPA Filter for Pet Hair on All Floors

The Shark Navigator Lift-Away is renowned for its versatility and powerful cleaning capabilities, making it a strong contender for the best vacuum for cat hair on a budget. Its unique Lift-Away feature allows you to detach the canister and clean hard-to-reach areas with ease, while the HEPA filter and Anti-Allergen Complete Seal technology capture 99.9% of dust and allergens. This makes it an excellent choice for homes with cats and allergy sufferers, ensuring a cleaner, fresher environment.

Key Features That Stand Out

  • βœ“ Lift-Away Functionality: Detachable canister for portable cleaning of stairs, furniture, and tight spots.
  • βœ“ Anti-Allergen Complete Seal Technology + HEPA Filter: Traps 99.9% of dust and allergens inside the vacuum.
  • βœ“ Brushroll Shutoff: Seamlessly transition from deep carpet cleaning to gentle bare floor cleaning.
  • βœ“ Powerful Suction: Handles pet hair and debris effectively on various floor types.

Why We Recommend It

For its price point, the Shark Navigator Lift-Away offers incredible value, combining powerful suction with allergen control – a crucial feature for cat owners. The Lift-Away mode truly expands its usability, allowing you to easily tackle pet hair on elevated surfaces, which is where cats love to lounge. It’s a robust solution for a thoroughly clean home without breaking the bank.

Best For

Cat owners seeking a powerful, versatile upright vacuum with excellent allergen filtration at an affordable price, suitable for all floor types and above-floor cleaning.

Pros and Cons

Pros:
  • Effective removal of pet hair from carpets and hard floors.
  • Lift-Away feature provides convenient portable cleaning.
  • HEPA filter and Anti-Allergen Seal are excellent for allergy sufferers.
  • Affordable price point for its features and performance.
Cons:
  • Can feel a bit top-heavy in upright mode.
  • Corded design limits reach without re-plugging.
  • Some users may find it louder than other models.

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: I actually was in the market for a new vacuum as there were parts breaking on my Bissell 2999. (Dust buildup inside the motor housing leading to bearing whine, brush roller wear that required modification to prevent additional damage, as well as handle damage that prevented the vacuum handle from st.

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

4. Bissell Pet Hair Eraser Allergen Lift-Off Vacuum with HEPA Filter and Tangle-Free Brush Roll.

Bissell Pet Hair Eraser Allergen Lift-Off Vacuum with HEPA Filter and Tangle-Free Brush Roll

The Bissell Pet Hair Eraser Allergen Lift-Off Vacuum is engineered with pet parents in mind, offering powerful suction and advanced features to combat cat hair and allergens. Its “Lift-Off” design provides the versatility of an upright and a portable canister, allowing you to clean every surface in your home. With a HEPA Sealed Allergen System and a Tangle-Free Brush Roll, this vacuum is a serious weapon against furry messes and airborne dander, making it one of the top choices for the best vacuum for cat hair.

Key Features That Stand Out

  • βœ“ Lift-Off Detachable Pod: Transforms from an upright to a portable canister for versatile cleaning of stairs, furniture, and above-floor areas.
  • βœ“ HEPA Sealed Allergen System: Captures 99.97% of dust and allergens, preventing them from re-entering your air.
  • βœ“ Tangle-Free Brush Roll: Minimizes hair wrap, ensuring consistent performance and less maintenance.
  • βœ“ Powerful Suction: Delivers strong pickup for embedded pet hair on various floor types.
  • βœ“ Specialized Pet Tools: Includes a Pet TurboBrush and 2-in-1 Pet Upholstery Tool for comprehensive cleaning.
See also  Pro Detailer's Choice: 5 Best Air Compressors for Car Detailing

Why We Recommend It

This Bissell model truly understands the challenges of cat hair. The tangle-free brush roll is a game-changer, eliminating the frustrating task of cutting hair out of the roller. Combined with the HEPA filtration and the flexible Lift-Off design, it provides a comprehensive cleaning solution that tackles both visible cat hair and invisible allergens, leading to a much cleaner and healthier living space.

Best For

Cat owners with allergies or multiple pets, who need a versatile vacuum that can deep clean all floor types and easily reach elevated surfaces and upholstery without hair tangles.

Pros and Cons

Pros:
  • Tangle-Free Brush Roll is excellent for long pet hair.
  • HEPA Sealed Allergen System significantly reduces airborne allergens.
  • Lift-Off design offers great versatility for whole-home cleaning.
  • Strong suction power effectively removes embedded cat hair.
Cons:
  • Can be a bit heavy in upright mode.
  • Corded operation might require switching outlets in larger homes.
  • The dirt bin might need frequent emptying with heavy shedding.

Customer Reviews

Customer Review: Wow! Just after our first use I can say this is the best vacuum we have owned while having a Bernese Mountain Dog and a Golden Retriever. It picked up an unbelievable amount of hair, left our floors looking brand new, and was so easy to use. The suction is powerful so picks up quickly. The design is.

Customer Review: I’ve had this vacuum for a several weeks now and I love it! It has great suction power and moves around easily. I have 4 dogs, so I vacuum almost every day to keep up with the hair. I use this on my hard floors as well as various rugs. I use the hose with the upholstery attachment on my couches and.

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

5. Shark ZU102 Rotator Pet Upright Vacuum with PowerFins HairPro & Odor Neutralizer Technology, Char…

Shark ZU102 Rotator Pet Upright Vacuum with PowerFins HairPro & Odor Neutralizer Technology, Char...

The Shark ZU102 Rotator Pet Upright Vacuum is a premium solution for homes with cats, combining innovative technologies to deliver superior cleaning and odor control. Its PowerFins HairPro brush roll actively grips and captures all types of pet hair, while the Self-Cleaning Brushroll ensures you’re never untangling hair from the roller. What truly sets this vacuum apart is its Odor Neutralizer Technology, which guards against unpleasant pet odors inside the vacuum, leaving your home smelling fresh. This makes it an excellent candidate for the best vacuum for cat hair, especially if odors are a concern.

Key Features That Stand Out

  • βœ“ PowerFins HairPro: Actively grips and captures long, short, and embedded pet hair on both carpets and hard floors.
  • βœ“ Self-Cleaning Brushroll: Automatically prevents hair wrap, maintaining optimal performance without manual cleaning.
  • βœ“ Odor Neutralizer Technology: Guards against bad odors inside the vacuum for a fresher-smelling home.
  • βœ“ Rotator Technology: Provides enhanced swivel steering for easy maneuvering around obstacles.
  • βœ“ Lift-Away Functionality: Detachable pod for convenient above-floor and stair cleaning.

Why We Recommend It

This Shark vacuum goes beyond just picking up cat hair; it actively combats pet odors, a common issue in multi-cat households. The combination of PowerFins for superior pickup and the self-cleaning brush roll for hassle-free maintenance makes it incredibly user-friendly. If you’re looking for a comprehensive pet hair vacuum cleaner that not only cleans but also refreshes your home, the ZU102 is an outstanding choice.

Best For

Cat owners who need a high-performance upright vacuum that effectively removes all types of cat hair, prevents hair tangles on the brush roll, and actively neutralizes pet odors for a truly fresh home.

Pros and Cons

Pros:
  • PowerFins HairPro provides exceptional cat hair pickup on all surfaces.
  • Self-Cleaning Brushroll eliminates frustrating hair wrap.
  • Odor Neutralizer Technology is a unique benefit for pet homes.
  • Versatile with Lift-Away mode and excellent maneuverability.
Cons:
  • Can be on the heavier side for some users.
  • Premium features may come with a higher price point.
  • Some accessories might feel bulky to store.

Customer Reviews

Customer Review: I just purchased this vacuum and am really impressed with it after the first use. It was really easy to put together. The instructions included are detailed with pictures. It’s easy to transition to handheld. There’s no extra hose you have to lug around or store. It’s lightweight so moving it up and.

Customer Review: I am where vacuums go to die. With 4 dogs and 5 cats, living on a mountain farm, I kill vacuums on a regular basis. I’ve managed to take out everything from an old Kirby to a new Dyson & everything in between. Even the ones designed for pet hair didn’t last long. Then I got a shark navigator. It wa.

Complete Buying Guide for Best Vacuum For Cat Hair

Choosing the best vacuum for cat hair can feel overwhelming with so many options available. To help you make an informed decision, we’ve outlined the essential factors we consider when evaluating pet hair vacuums. Thinking through these points will ensure you pick a model that truly meets your specific needs as a cat owner.

Essential Factors We Consider

When searching for a cat hair vacuum cleaner, several key features stand out as crucial:

  • βœ“ Suction Power: This is non-negotiable. Cat hair can embed itself deeply into carpets and upholstery. A vacuum with strong, consistent suction is vital to effectively lift and remove it. Look for models specifically marketed for “pet hair” as they typically have enhanced motors.
  • βœ“ Brush Roll Type (Tangle-Free): Traditional brush rolls can quickly get clogged with long cat hair, reducing effectiveness and requiring frequent maintenance. Vacuums with a tangle-free brush roll or self-cleaning technology are a huge advantage, saving you time and effort.
  • βœ“ Filtration System (HEPA): Cats don’t just shed hair; they also produce dander, which is a common allergen. A multi-stage filtration system, especially one with a HEPA filter pet vacuum, is critical. This traps tiny particles and allergens, preventing them from being released back into the air. An Anti-Allergen Complete Seal is an added bonus.
  • βœ“ Specialized Pet Tools & Attachments: Look for vacuums that come with specific tools like a Pet TurboBrush, crevice tools, or upholstery brushes. These are invaluable for cleaning cat hair off furniture, stairs, and tight corners where your furry friend loves to nap.
  • βœ“ Maneuverability & Design: Whether you prefer an upright pet vacuum with swivel steering or a lightweight cordless cat vacuum for quick cleanups, consider how easily it moves around your home. Lift-Away designs offer the flexibility of an upright and a portable canister, perfect for tackling above-floor areas.
  • βœ“ Dust Bin Capacity & Emptying: With constant shedding, you’ll be emptying the dust bin frequently. A larger capacity can reduce trips to the trash, and an easy-to-empty, hygienic design is a definite plus.
  • βœ“ Corded vs. Cordless: Corded vacuums generally offer consistent, powerful suction for long cleaning sessions. Cordless models provide freedom of movement and are great for quick spot cleaning, but often have limited battery life and slightly less power.
See also  5 Best Tool Bags for Electricians: Expert Picks for Quality & Durab...

Budget Planning

Your budget plays a significant role in your choice, but remember that investing in a good vacuum cleaner for cat owners can save you headaches and cleaning time in the long run. Entry-level pet vacuums start around $100-$150 and can offer decent performance for basic needs. Mid-range options ($150-$300) often come with enhanced suction, better filtration, and more specialized tools. Premium models ($300+) boast advanced features like self-cleaning brush rolls, superior allergen sealing, and robust designs. Consider how often you’ll be using it and the severity of your cat’s shedding before deciding on a price point.

Final Thoughts

Ultimately, the perfect cat hair vacuum for you will depend on your specific home, your cleaning habits, and the number of cats you have. Prioritize strong suction, effective hair management (like tangle-free brushes), and good filtration to keep your home clean and minimize allergens. Don’t underestimate the convenience of specialized tools and thoughtful design features that make the cleaning process smoother.

Frequently Asked Questions

Q: What features are essential for a vacuum to be effective against cat hair?

A: Essential features include strong suction, a specialized brush roll designed to pick up pet hair (preferably tangle-free), a multi-stage filtration system with a HEPA filter to capture dander, and dedicated pet tools like a mini-motorized brush for upholstery.

Q: Are cordless vacuums good for cat hair, or should I stick to corded?

A: Cordless vacuums are excellent for quick cleanups, spot treatments on furniture, and reaching areas like cat trees or car interiors due to their maneuverability. However, for deep cleaning large homes or heavily carpeted areas, corded vacuums typically offer more consistent, stronger suction and unlimited run time, making them ideal for tackling significant amounts of cat hair.

Q: How often should I vacuum if I have cats?

A: If you have cats, especially during shedding seasons, vacuuming daily or every other day is recommended. This helps to keep the accumulation of cat hair and dander to a minimum, significantly improving air quality and overall cleanliness.

Q: What’s the main difference between a regular vacuum and a pet vacuum?

A: Pet hair vacuum cleaners are specifically engineered to handle the unique challenges posed by pet hair and dander. They typically feature stronger suction, specialized brush rolls less prone to tangling, enhanced filtration systems (like HEPA filters) to capture allergens, and a range of dedicated pet-specific attachments for thorough cleaning of various surfaces.

Q: Do I really need a HEPA filter in my vacuum if I have cats?

A: Yes, if you or anyone in your household suffers from allergies or asthma, a HEPA filter is highly recommended. Cats produce dander, microscopic skin flakes that are a common allergen. A HEPA filter captures 99.97% of airborne particles, including dander, pollen, and dust mites, preventing them from circulating back into your home’s air and helping to alleviate allergy symptoms.

Choosing the best vacuum for cat hair is more than just buying a cleaning appliance; it’s an investment in a cleaner, healthier, and happier home for both you and your feline companions. We hope this guide has shed some light on your options, from powerful uprights to versatile handhelds, each designed to make the daily battle against cat hair a little easier. Consider your specific needs, floor types, and budget, and pick a vacuum that will effectively remove cat hair and keep your living space pristine. Happy vacuuming!

// Fetch real-time product data for all products when page loads
(function() {
const products = [‘B07F6N3RT6’, ‘B07CB6RBSP’, ‘B005KMDV9A’, ‘B0DP5JNLQR’, ‘B0BQX5BR7C’];
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