问题
I have some code like this:-
const request=require('request');
const url=require('url');
const cheerio=require('cheerio');
request({uri: 'https://www.facebook.com/'}, (err, resp, body)=>{
var $=cheerio.load(body);
console.log($('title').text());
console.log($('body').text())
});
When I try to request to facebook or google the response returned is something like:-
Facebook - ??? ??? ?????? | Facebook
??????? login or signup ??????? ??
or
Google
Signin??? ???....
How can I solve these question marks?
来源:https://stackoverflow.com/questions/58750335/unable-to-perform-requests-in-node-js