Skip to content

Instantly share code, notes, and snippets.

@nitipatl
Created July 10, 2019 11:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nitipatl/d54afde8c617a57215b78b1fc0304aac to your computer and use it in GitHub Desktop.
Save nitipatl/d54afde8c617a57215b78b1fc0304aac to your computer and use it in GitHub Desktop.
var osmosis = require('osmosis');
osmosis
.get('http://quotes.toscrape.com/')
.find('div.quote')
.set({
quote: 'span.text',
author: 'span > small.author',
tags: ['div.tags > a.tag'],
})
.data(function(res) {
console.log(res)
})
.log(console.log)
.error(console.log)
.debug(console.log)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment