RunKit + npm: cheerio

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