Created
June 26, 2021 05:30
-
-
Save RayBB/02b9dc13153cab5588521ca9b9d94848 to your computer and use it in GitHub Desktop.
EMJMD Catalogue Scraper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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