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) {
|
||||
const el = document.querySelector(".atg_store_newPrice");
|
||||
if (!el) throw new Error("no encuentro el precio");
|
||||
const nStr = el
|
||||
.textContent!.trim()
|
||||
if (!el?.textContent) throw new Error("no encuentro el precio");
|
||||
const nStr = el.textContent
|
||||
.trim()
|
||||
.replace("$", "")
|
||||
.replaceAll(".", "")
|
||||
.replace(",", ".");
|
||||
|
|
Loading…
Reference in a new issue