Skip to content

Instantly share code, notes, and snippets.

@Kenya-West
Created March 19, 2024 13:32
Show Gist options
  • Save Kenya-West/c161b1c9375196ce2e4022794d91bf65 to your computer and use it in GitHub Desktop.
Save Kenya-West/c161b1c9375196ce2e4022794d91bf65 to your computer and use it in GitHub Desktop.
Get currencies' values and names from Russian Central bank website
// 1. Navigate to https://www.cbr.ru/currency_base/dynamics/
// 2. Open browser devtools
// 3. Paste this code
// 4. it outputs an array with currencies codes and text names
Array.from(document.querySelectorAll("#UniDbQuery_VAL_NM_RQ > option")).map((elem) => { return { value: elem.value, name: elem.innerText?.trim() } });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment