如题,今天想爬取电影站的html页面发现服务器就返回给我部分html,不是全的。ps:网站是 http://www.66ys.tv/xijupian/20170211/34150.html,电影站还不错。有没有哪位高人可以帮助我解决一下的,万分感谢。代码:http.createServer(function (request, response) {
http.get(“http://www.66ys.tv/xijupian/20170211/34150.html”, function (res) {
var html = "";
res.on('data', function(chunk){
html +=chunk;
});
res.on('end', function () {
response.writeHead(200, { 'Content-Type': 'text/html' });
response.end(html);
});
}).on('error', function(e){
console.log(e.message);
})
}).listen(port);
http.get(“http://www.66ys.tv/xijupian/20170211/34150.html”, function (res) {
var html = "";
res.on('data', function(chunk){
html +=chunk;
});
res.on('end', function () {
response.writeHead(200, { 'Content-Type': 'text/html' });
response.end(html);
});
}).on('error', function(e){
console.log(e.message);
})
}).listen(port);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货