Skip to content

Instantly share code, notes, and snippets.

@Bradshaw
Last active July 5, 2019 13:55
Show Gist options
  • Save Bradshaw/73536d897fe2130762124e8302dfcbc2 to your computer and use it in GitHub Desktop.
Save Bradshaw/73536d897fe2130762124e8302dfcbc2 to your computer and use it in GitHub Desktop.
Example of how to parse XXIIVV webring sites.js file
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