Skip to content

Instantly share code, notes, and snippets.

@awitherow
Last active May 22, 2022 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awitherow/759d454bbd914f668882e10809cc721d to your computer and use it in GitHub Desktop.
Save awitherow/759d454bbd914f668882e10809cc721d to your computer and use it in GitHub Desktop.
Circle.so Member Page Lead Extractor

How to Use:

  1. load all members on a circle.so membership page by scrolling to the bottom
  2. open the dev tools
  3. paste in console
  4. hit enter

Info:

working as of May 22, 2022. if it breaks, it means their code changed and this needs to be modified

(function () {
const info = Array.from(
document.getElementsByClassName("community-member")
).map((member) => {
const q = ({ p, s }) => p.querySelector(s);
const qa = ({ p, s }) => p.querySelectorAll(s);
return {
pic: q({ p: member, s: ".user__avatar img" })?.src,
name: q({ p: member, s: ".user__avatar img" })?.alt,
slogan: q({ p: member, s: ".community-member__headline" })?.innerText,
links: Array.from(
qa({ p: member, s: ".community-member__social-media" })
)?.map((c) => ({
href: q({ p: c, s: "a" }).href,
location: q({ p: c, s: ".sr-only.capitalize" }).innerText,
})),
};
});
const save = function (data, filename) {
if (!data) {
console.error("Console.save: No data");
return;
}
if (!filename) filename = "console.json";
if (typeof data === "object") {
data = JSON.stringify(data, undefined, 4);
}
var blob = new Blob([data], { type: "text/json" }),
a = document.createElement("a");
var e = new MouseEvent("click", {
view: window,
bubbles: true,
cancelable: false,
});
a.download = filename;
a.href = window.URL.createObjectURL(blob);
a.dataset.downloadurl = ["text/json", a.download, a.href].join(":");
a.dispatchEvent(e);
};
save(info, document.title);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment