Skip to content

Instantly share code, notes, and snippets.

@eiiot
Forked from nodaguti/quizlet-scraper.js
Created March 27, 2024 06:24
Show Gist options
  • Save eiiot/327101466a98493c69f2047f5bc1983d to your computer and use it in GitHub Desktop.
Save eiiot/327101466a98493c69f2047f5bc1983d to your computer and use it in GitHub Desktop.
Quizlet to CSV
/**
* Convert a list on Quizlet into CSV-formatted text.
* Usage:
* i) Copy and paste into your browser's console.
* ii) Run it!
*/
(() => {
const terms = document.querySelectorAll('.SetPageTerms-term');
const csv = [];
Array.from(terms).forEach((term) => {
const word = term.querySelector('.lang-en').textContent.replace(/[\n\r]+/g, '/');
const def = term.querySelector('.lang-fr').textContent.replace(/[\n\r]+/g, '/');
csv.push(`"${word}","${def}"`);
});
console.log(csv.join('\n'));
})();
@eiiot
Copy link
Author

eiiot commented Mar 27, 2024

Replace the lang-xx with your languages. The old scraper broke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment