var http = require('http');
var cheerio = require('cheerio')
var url = 'http://www.dodzz.com/links.html'
function filterChapters(html){
var $ = cheerio.load(html)
var chapters = $('meta')
chapters.each(function(item){
var chapter = $(this).find('keywords').attr('content')
//这里运行后 没有任何提示(我想问下怎么爬取html页面中meta属性内容)
console.log(chapter)
})
http.get(url,function(res){
var html = ''
res.on('data',function(data){
html += data
})
res.on('end',function(){
filterChapters(html)
})
}).on('error',function(){
console.log('error')
})
反手de温柔
反手de温柔
随时随地看视频慕课网APP
相关分类