Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: cheerio
node v4.9.1
endpoint
share
tweet
var request = require('request'); var cheerio = require('cheerio'); request('http://www.instructables.com/id/Making-an-online-Fish-Tank-webcam!/step3/Cut-the-project-box/', function (error, response, html) { if (!error && response.statusCode == 200) { var $ = cheerio.load(html); var obj = $("script").attr("type","application/ld+json"); console.log(obj); console.log(obj[4].text); } });
Created from: https://runkit.com/npm/cheerio
Loading…
no comments
sign in
to comment