Scrape-it Note.js如何刮西里尔字母

时间:2018-08-21 11:47:53

标签: node.js utf-8 scrape cyrillic scraper

我需要在西里尔字母中抓取文字 但是我得到了����������������������而不是“Четыретысячичетыреста” 我使用这段代码

var data = {
   Name:{
        selector:maindir + "h1.moviename-big",
        // convert:function(x){
        //     return x.toString('utf-8');
        // }
}
}

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        page = scrapeIt.scrapeHTML(body,data);
        inf.List.push(page);
        jsonfile.writeFile('List.json', inf, { spaces: 2}, function (err) {
            console.error(err || 'success Write in Json')
        });
    }
}

0 个答案:

没有答案