Answer the question
In order to leave comments, you need to log in
How to get the correct answer when parsing?
Good afternoon, I'm trying to parse kinopoisk through request, when I pull out the name of the movie, I get
'������' in response. '������'
How to get the right answer?
Answer the question
In order to leave comments, you need to log in
var options = {
method: 'GET',
uri: 'https://www.kinopoisk.ru/index.php?first=no&what=&kp_query='+encodeURIComponent(filmName),
json: true
};
rp(options)
.then(function (htmlString) {
$ = cheerio.load(htmlString);
var poster = $('.most_wanted>.pic>a>img').attr('title');
var title = $('.most_wanted>.info>.name>a').html();
console.log(title );
var filmData = new Array({poster: poster, title: title});
resolve(filmData);
})
.catch(function (err) {
// Crawling failed...
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question