Find Featured Property Detail Links

Site alpinesouthproperties.comTask find-featured-property-detail-linksVersion v1Updated Jul 28, 2026Category real-estate

Extract unique same-site property detail URLs from the Featured Properties section on Alpine South Properties portfolio pages. This skill was captured from a live agent session on alpinesouthproperties.com and publishes here verbatim, exactly as an agent receives it.

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.

Purpose

Find the property detail links contained specifically in the Featured Properties section of the Alpine South Properties portfolio page.

When to Use

Use when the caller needs property detail URLs from the Featured Properties section at /portfolio, rather than every internal link on the site.

Workflow

  1. Navigate directly to https://www.alpinesouthproperties.com/portfolio.
  2. In the same browser call, run this evaluator on the loaded page. It locates the heading whose text begins with Featured Properties, selects its nearest meaningful section/container, and returns deduplicated same-origin detail links while excluding the portfolio page, search paths, fragments, and non-property page links:
(() => {
  const clean = s => (s || '').replace(/\\s+/g, ' ').trim();
  const heading = [...document.querySelectorAll('h1,h2,h3,h4,h5,h6,[role="heading"]')]
    .find(el => /^Featured\\s+Properties\\b/i.test(clean(el.textContent)));
  if (!heading) return {sectionFound: false, links: []};

  let container = heading.closest('section, article');
  if (!container) {
    let node = heading.parentElement;
    while (node && node !== document.body) {
      const count = node.querySelectorAll('a[href]').length;
      if (count > 0) { container = node; break; }
      node = node.parentElement;
    }
  }
  if (!container) return {sectionFound: true, links: []};

  const links = [];
  const seen = new Set();
  for (const a of container.querySelectorAll('a[href]')) {
    let url;
    try { url = new URL(a.href, location.href); } catch (_) { continue; }
    if (url.origin !== location.origin || url.hash || url.pathname === '/portfolio' || url.pathname.startsWith('/s/')) continue;
    const href = url.href.replace(/\\/$/, '');
    if (seen.has(href)) continue;
    seen.add(href);
    links.push({href: url.href, text: clean(a.textContent || a.getAttribute('aria-label') || '')});
  }
  return {sectionFound: true, links};
})()

Site-Specific Gotchas

  • The featured area must be scoped from the Featured Properties heading; extracting all same-origin anchors from /portfolio also captures navigation and unrelated page links.
  • A property card may expose the same detail URL through both its image and title, so deduplicate by normalized absolute URL.
  • The section can use nested card containers rather than a single obvious list; the evaluator first checks semantic section/article ancestors and then falls back to the nearest ancestor containing links.
  • The evaluator intentionally excludes /s/ search routes and the portfolio index; if Alpine South later introduces a dedicated property URL prefix, retain the section scoping and adjust only the exclusion rules as needed.

Expected Output

An object of the form {sectionFound: boolean, links: [{href: string, text: string}]}. links contains one absolute URL per Featured Properties property detail page, in DOM order.

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=alpinesouthproperties.com&task=find-featured-property-detail-links