Skip to content

Commit

Permalink
fix Kosik extension
Browse files Browse the repository at this point in the history
  • Loading branch information
salax committed Aug 3, 2023
1 parent e0f435b commit 3177099
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extension/shops/kosik.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export class Kosik extends StatefulShop {
try {
const data = {};
data.itemId = elem
.querySelector("[itemprop=productID]")
.getAttribute("content");
data.title = elem.querySelector("[itemprop=name]").textContent;
.querySelector('[id^="product-detail-"]')
.id.match(/\d+/)[0];
data.title = elem.querySelector(".product-name").textContent;
data.currentPrice = cleanPriceText(
elem.querySelector("[itemprop=price]").textContent
elem.querySelector(".product-price").textContent
);
data.originalPrice = cleanPrice(".product-header-box s");
data.imageUrl = elem
.querySelector("[itemprop=image] img")
.querySelector("[data-tid=product-detail__product-image] img")
.getAttribute("srcset")
.split(",")
.pop()
Expand Down

0 comments on commit 3177099

Please sign in to comment.