➜ ~ npm install cheerio
/Users/ringcrl
└── cheerio@0.20.0
npm WARN enoent ENOENT: no such file or directory, open '/Users/ringcrl/package.json'
npm WARN ringcrl No description
npm WARN ringcrl No repository field.
npm WARN ringcrl No README data
npm WARN ringcrl No license field.
/Users/ringcrl
└── cheerio@0.20.0
npm WARN enoent ENOENT: no such file or directory, open '/Users/ringcrl/package.json'
npm WARN ringcrl No description
npm WARN ringcrl No repository field.
npm WARN ringcrl No README data
npm WARN ringcrl No license field.
2016-04-20
最新回答 / microzz
//适合现在慕课网的代码,水平有限,有不足希望指点var http = require('http')var cheerio = require('cheerio')var url = 'http://www.imooc.com/learn/348/'function filterChapters(html){ var $ =cheerio.load(html) var chapters = $('.chapter') var courseData=[] chapters.each...
2016-04-20