Skip to content

Instantly share code, notes, and snippets.

@RayBB
Created June 26, 2021 05:30
Show Gist options
  • Save RayBB/02b9dc13153cab5588521ca9b9d94848 to your computer and use it in GitHub Desktop.
Save RayBB/02b9dc13153cab5588521ca9b9d94848 to your computer and use it in GitHub Desktop.
EMJMD Catalogue Scraper
// For https://www.eacea.ec.europa.eu/scholarships/emjmd-catalogue_en?f%5B0%5D=years_for_emjmd_years_for_emjmd%3A14
// Run in console
Array.from(document.querySelectorAll(".ecl-u-flex-grow-1"))
.filter(e => e.innerText.includes("locations"))
.map(e => {
const name = e.querySelector(".ecl-u-type-heading-5").innerText;
const website = e.querySelector(".ecl-content-item__description a").href;
const countries = e.querySelector(".ecl-description-list__definition").innerText.split("\n");
return `${name}\t${website}\t${countries.join(',')}`
})
.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment