Skip to content

Commit

Permalink
some meli descs may not be available...
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomatiasgomez committed Nov 6, 2023
1 parent 3c0a283 commit 195d762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/connector/browsers/mercadolibre-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MercadoLibreBrowser extends SiteBrowser {
let status = statusEl ? statusEl.innerText.trim() : "ONLINE";

let title = container.querySelector(".ui-pdp-title").innerText.trim();
let description = container.querySelector(".ui-pdp-description__content").innerText.split(/(?:\n|\. )+/).map(l => l.trim()).filter(l => !!l);
let description = container.querySelector(".ui-pdp-description__content")?.innerText.split(/(?:\n|\. )+/).map(l => l.trim()).filter(l => !!l);
let price = container.querySelector(".ui-pdp-price").innerText.split("\n").slice(1).join(" ").trim();
// Seems that some listings don't display the address, but the API still provides it... Eventually could be grabbed it from there.
// skipped for now
Expand Down

0 comments on commit 195d762

Please sign in to comment.