Last active
April 17, 2026 13:04
-
-
Save s3rgeym/010d172e62fe62a57f63e7144e84e064 to your computer and use it in GitHub Desktop.
get crypto exchange list https://coinmarketcap.com/ru/rankings/exchanges/
This file contains hidden or 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
| Promise.allSettled( | |
| $$('.dWwPjl a').map(link => new Promise(async (resolve, reject) => { | |
| try { | |
| let response = await fetch(link.href) | |
| let html = await response.text() | |
| let doc = new DOMParser().parseFromString(html, 'text/html') | |
| let directLink = doc.querySelector('.cmc-details-panel-links a') | |
| resolve(directLink.href) | |
| } catch (e) { | |
| reject(e) | |
| } | |
| }) | |
| )).then(promisses => | |
| console.log( | |
| promisses | |
| .filter(p => p.status === 'fulfilled') | |
| .map(p => p.value) | |
| .join('\n') | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment