Last active
July 5, 2019 13:55
-
-
Save Bradshaw/73536d897fe2130762124e8302dfcbc2 to your computer and use it in GitHub Desktop.
Example of how to parse XXIIVV webring sites.js file
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
const request = require('request') | |
const gatherSiteObjects = () => { | |
return new Promise((resolve, reject) => { | |
request('https://webring.xxiivv.com/data/sites.json', (err, _, body) => { | |
if (!err) { | |
const siteObjects = JSON.parse(body) | |
resolve(siteObjects) | |
} else reject(err) | |
}) | |
}) | |
} | |
gatherSiteObjects() | |
.then(sites => console.log(sites)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment