nodejs 爬虫遇到形如;安卓端的编码如何转换为中文?

  node.js, question

The source code of the website before climbing:

< p > although many such plug-ins can be searched on the internet, it is because there are too many such plug-ins that I do not know how to choose, so please recommend the touch screen plug-ins < /p > which are easy to use and are still under active maintenance.

Results returned after climbing:

<p>&#x867D;&#x7136;&#x53EF;&#x4EE5;&#x5728;&#x7F51;&#x4E0A;&#x641C;&#x7D22;&#x5F88;&#x591A;&#x7684;&#x8FD9;&#x6837;&#x7C7B;&#x4F3C;&#x7684;&#x63D2;&#x4EF6;,&#x4F46;&#x662F;&#x5C31;&#x662F;&#x56E0;&#x4E3A;&#x592A;&#x591A;&#x4E86;&#x800C;&#x4E0D;&#x77E5;&#x9053;&#x8BE5;&#x600E;&#x4E48;&#x9009;&#x62E9;,&#x6240;&#x4EE5;&#x8BF7;&#x5927;&#x5BB6;&#x554A;&#x63A8;&#x8350;&#x4E00;&#x4E0B;,&#x597D;&#x7528;&#x7684;,&#x800C;&#x4E14;&#x8FD8;&#x5728;&#x79EF;&#x6781;&#x7EF4;&#x62A4;&#x7684;&#x89E6;&#x5C4F;&#x63D2;&#x4EF6;</p>

An attempt to transcode with decode of iconv-lite module failed.

This is calledHTML Entities, can be converted by means of some modules, such as,html-entities Github.

The code is as follows:

var Entities = require('html-entities').XmlEntities;
entities = new Entities();
var str = '<p>&#x867D;&#x7136;&#x53EF;&#x4EE5;&#x5728;&#x7F51;&#x4E0A;&#x641C;&#x7D22;&#x5F88;&#x591A;&#x7684;&#x8FD9;&#x6837;&#x7C7B;&#x4F3C;&#x7684;&#x63D2;&#x4EF6;,&#x4F46;&#x662F;&#x5C31;&#x662F;&#x56E0;&#x4E3A;&#x592A;&#x591A;&#x4E86;&#x800C;&#x4E0D;&#x77E5;&#x9053;&#x8BE5;&#x600E;&#x4E48;&#x9009;&#x62E9;,&#x6240;&#x4EE5;&#x8BF7;&#x5927;&#x5BB6;&#x554A;&#x63A8;&#x8350;&#x4E00;&#x4E0B;,&#x597D;&#x7528;&#x7684;,&#x800C;&#x4E14;&#x8FD8;&#x5728;&#x79EF;&#x6781;&#x7EF4;&#x62A4;&#x7684;&#x89E6;&#x5C4F;&#x63D2;&#x4EF6;</p>';

console.log(entities.decode(str)); //output <p>虽然可以在网上搜索很多的这样类似的插件,但是就是因为太多了而不知道该怎么选择,所以请大家啊推荐一下,好用的,而且还在积极维护的触屏插件</p>