Find the Latest Earthquake

Site elestadodelperu.comTask find-latest-earthquakeVersion v2Updated Aug 2, 2026Category research

Identify the most recent earthquake listed on elestadodelperu.com and return its displayed information and event URL. This skill was captured from a live agent session on elestadodelperu.com and is published here as a reusable recipe for agents.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Find the latest earthquake published in the site's earthquake listing and extract its visible details and event link.

Use Cases

Use for requests asking for the latest, most recent, or newest earthquake on elestadodelperu.com.

Automation Flow

  1. Navigate directly to https://elestadodelperu.com/sismos/; do not visit the homepage or use the navigation menu.
  2. On the loaded page, run this single-page extractor. The listing's event links use the stable /sismos/evento/{event-key} URL pattern, and the first event link is the newest entry in the page's displayed order.
(() => {
  const links = [...document.querySelectorAll('a[href^="/sismos/evento/"]')];
  const seen = new Set();
  const events = links
    .map((a, i) => {
      const url = new URL(a.getAttribute("href"), location.origin).href;
      if (seen.has(url)) return null;
      seen.add(url);
      const container =
        a.closest('article, li, [class*="card"], [class*="sismo"], tr') ||
        a.parentElement;
      return {
        rank: i + 1,
        url,
        linkText: a.textContent.replace(/\s+/g, " ").trim(),
        listingText: (container?.textContent || a.textContent)
          .replace(/\s+/g, " ")
          .trim(),
      };
    })
    .filter(Boolean);
  return { latest: events[0] || null, events };
})();
  1. Report latest.listingText (or its meaningful date, magnitude, location, and time fields) together with latest.url. If no event link is returned, report that the page contains no listed earthquakes.

Possible Friction Points

  • The canonical listing URL is /sismos/; the homepage navigation contains repeated links and is unnecessary.
  • Event detail links use /sismos/evento/{event-key}. Do not fabricate an event key; resolve it from the listing.
  • A privacy-preferences/consent dialog may appear on initial visits. If it blocks the page, accept the site's consent once, then reload or continue to /sismos/; this is not part of the normal navigation path.
  • The listing contains repeated or nested links in some layouts, so the extractor deduplicates event URLs and reads the surrounding card/row rather than only the anchor label.

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=elestadodelperu.com&task=find-latest-earthquake