mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-26 03:26:19 +00:00
coto: trimmear titulo
This commit is contained in:
parent
3690f63405
commit
de3bf4900c
2 changed files with 4 additions and 2 deletions
|
@ -34,7 +34,9 @@ export function getCotoProduct(html: string | Buffer): Precioish {
|
||||||
const ean = getEanFromText(dom);
|
const ean = getEanFromText(dom);
|
||||||
const precioCentavos = getPriceFromText(dom);
|
const precioCentavos = getPriceFromText(dom);
|
||||||
|
|
||||||
const name = dom.document.querySelector("h1.product_page")?.textContent;
|
const name = dom.document
|
||||||
|
.querySelector("h1.product_page")
|
||||||
|
?.textContent?.trim();
|
||||||
const imageUrl = dom.document.querySelector<HTMLImageElement>(
|
const imageUrl = dom.document.querySelector<HTMLImageElement>(
|
||||||
".productImageZoom img"
|
".productImageZoom img"
|
||||||
)?.src;
|
)?.src;
|
||||||
|
|
|
@ -13,7 +13,7 @@ import { DB_PATH } from "db-datos/drizzle.config.js";
|
||||||
import { migrateDb } from "db-datos/migrate.js";
|
import { migrateDb } from "db-datos/migrate.js";
|
||||||
|
|
||||||
const DEBUG = false;
|
const DEBUG = false;
|
||||||
const PARSER_VERSION = 2;
|
const PARSER_VERSION = 3;
|
||||||
|
|
||||||
migrateDb();
|
migrateDb();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue