Find Classical Conversations events near a supplied ZIP or postal code and return the data displayed in the locator's results panel, including links to each event's detail page.
Use Cases
Use when the caller provides a ZIP or postal code and wants nearby event information shown by the Classical Conversations events locator.
Automation Flow
- Navigate to
https://classicalconversations.com/events/. - Fill
input#postal-codewith{postal-code}and submit usingbutton[type='submit']. - Wait for the dynamically populated
#resultspanel to update; allow approximately 3 seconds if the page provides no network-idle or DOM-change signal. - Run this extractor on the loaded page:
(() => {
const normalize = (value) =>
(value || "")
.replace(/\u00a0/g, " ")
.replace(/[ \t]+/g, " ")
.replace(/\n{3,}/g, "\n\n")
.trim();
const panel = document.querySelector("#results");
const events = Array.from(panel?.querySelectorAll('a[href*="?id="]') || []).map(
(a) => {
const card = a.closest("article, li") || a.parentElement;
return {
title: normalize(
a.innerText || card?.querySelector("h1,h2,h3,h4,h5,h6")?.innerText || "",
),
url: a.href,
details: normalize(card?.innerText || a.innerText || ""),
};
},
);
return {
postalCode: (document.querySelector("#postal-code")?.value || "").trim(),
city: (document.querySelector("#city")?.value || "").trim(),
state: (document.querySelector("#state")?.value || "").trim(),
results: normalize(panel?.innerText),
events,
};
})();Event detail links use the durable pattern https://classicalconversations.com/events/?id={opaque-event-id} and should be returned from the anchor href rather than guessed.
Possible Friction Points
- The locator requires submitting the form after entering the postal code; merely changing the field does not populate the results.
- Results are dynamically inserted into
#results, so extract only after the submit operation has completed and the panel has updated. #cityand#statemay be populated by the site and should be returned when present; they are not necessary inputs.- Extract rendered text from
#resultsas well as matching anchors, because the panel may contain different event-card layouts. - Event links are anchors whose URLs contain
?id=. The query value is opaque and must be read from the rendered result, never fabricated. - The relevant controls are
input#postal-code,button[type='submit'],#city,#state, and#results.