[英]Get external website content using node js
In my website I am using node js for backend and html for front end. 在我的网站中,我使用节点js作为后端,使用html作为前端。 I need to get external website metadata (keywords).
我需要获取外部网站元数据(关键字)。
Have any package for get the metadata in node js? 有任何包来获取节点js中的元数据吗?
For example i have 100 website url in array following like this. 例如,我有100个网站url在数组之后像这样。
var arrayName = ["http://www.realsimple.com/food-recipes/9-healthy-predinner-snacks", "http://www.womenshealthmag.com/weight-loss/100-calorie-snacks", "https://www.pinterest.com/explore/healthy-snacks/", "http://www.rd.com/slideshows/healthy-snacks-for-adults/", "http://greatist.com/snacking", "http://www.bodybuilding.com/fun/26-best-healthy-snacks.html"]
I need to get all website metadata particularly in keywords of metadata. 我需要特别在元数据的关键字中获取所有网站元数据。 In node js have any package for this ?
在节点js有任何包吗?
I found some code in google. 我在谷歌找到了一些代码。
var options = {
host: 'www.google.com',
port: 80,
path: '/index.html'
};
http.get(options, function(res) {
console.log("Got response: " + res.statusCode);
}).on('error', function(e) {
console.log("Got error: " + e.message);
});
Have any other options? 还有其他选择吗?
Expected Outputs: 预期产出:
Array1 = ["keyword1","keyword2","keyword3"];
Array2 = ["keyword1","keyword2","keyword3"];
Array3 = ["keyword1","keyword2","keyword3"];
Array1, Array2, Array3 are Site1,Site2,Site3 like this. Array1,Array2,Array3是Site1,Site2,Site3。
I'll suggest you to use any from following packages: 我建议你使用以下包中的任何一个:
Note: You need to code it by yourself to grasp keywords from site data.
注意:您需要自己编写代码以掌握网站数据中的关键字。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.