mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-27 03:56:19 +00:00
chore coto
This commit is contained in:
parent
b77fe29ca1
commit
01f97140ec
1 changed files with 3 additions and 3 deletions
|
@ -19,9 +19,9 @@ function getEanFromText({ document }: Window) {
|
||||||
}
|
}
|
||||||
function getPriceFromText({ document }: Window) {
|
function getPriceFromText({ document }: Window) {
|
||||||
const el = document.querySelector(".atg_store_newPrice");
|
const el = document.querySelector(".atg_store_newPrice");
|
||||||
if (!el) throw new Error("no encuentro el precio");
|
if (!el?.textContent) throw new Error("no encuentro el precio");
|
||||||
const nStr = el
|
const nStr = el.textContent
|
||||||
.textContent!.trim()
|
.trim()
|
||||||
.replace("$", "")
|
.replace("$", "")
|
||||||
.replaceAll(".", "")
|
.replaceAll(".", "")
|
||||||
.replace(",", ".");
|
.replace(",", ".");
|
||||||
|
|
Loading…
Reference in a new issue