Retrieve the first 10 latest news items from El Comercio, including each headline and its article URL.
Use Cases
Use for requests to obtain the latest or most recent news from elcomercio.pe.
Automation Flow
- Navigate directly to
https://elcomercio.pe/ultimas-noticias/; the homepage is not required. - On the loaded page, run this evaluator to return the first 10 headline records:
(() =>
[...document.querySelectorAll("h2")].slice(0, 10).map((h) => ({
title: h.textContent.trim(),
url:
h.closest("article")?.querySelector("a[href]")?.href ||
h.querySelector("a[href]")?.href ||
null,
})))();Possible Friction Points
- The latest-news listing is available at the stable direct path
/ultimas-noticias/; avoid the homepage and navigation clicks. - Headlines are represented by
h2elements. Article links are usually found within the enclosingarticle; the evaluator falls back to a link inside the heading. - An advertising overlay may expose
button#adk_closing-x. Dismiss it only if it blocks interaction or evaluation; it is not otherwise required. - The first 10
h2elements are treated as the requested latest items; verify that returned records have non-null URLs if the page layout changes.