Skip to content

Instantly share code, notes, and snippets.

@shcallaway
Last active December 14, 2018 21:59
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 shcallaway/955e483a1566f95686bc1bdc7b503089 to your computer and use it in GitHub Desktop.
Save shcallaway/955e483a1566f95686bc1bdc7b503089 to your computer and use it in GitHub Desktop.
Download a CSV of Wealthfront's Career Launching Companies
companies = [...document.querySelectorAll(".company_name")];
locations = [...document.querySelectorAll(".location")];
companies = companies.map(companyName => companyName.innerText);
locations = locations.map(location => location.innerText);
let data = "";
for (let i = 0; i < companies.length; i++) {
let company = companies[i];
let location = locations[i];
data += `${company},"${location}"\n`;
}
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(data));
element.setAttribute('download', "wealthfront.csv");
element.style.display = 'none';
document.body.appendChild(element);
element.click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment