JSFiddle - React, Tailwind, and code Playground
JavaScript
const rp = require('request-promise');
const cheerio = require('cheerio');
const iconv = require('iconv-lite');
const url = 'https://vologda.carpet-gold.ru/';
rp(url)
.then(function(html) {
//html = iconv.encode(html,'windows-1251');//����� ��������: �. �������, ��. ��������, 9�
//html = iconv.encode(html,'utf-8');//����� ��������: �. �������, ��. ��������, 9�
//html = iconv.encode(iconv.decode(html, 'windows-1251'), 'utf8');//эээээ ээээээээ: э. эээээээ, ээ. ээээээээ, 9э
//html = iconv.encode(iconv.decode(html, 'windows-1251'), 'utf8');//c decodeEntities: false ����� ��������: �. �������, ��. ��������, 9�
//html = iconv.decode(html, 'windows-1251'); //эээээ ээээээээ: э. эээээээ, ээ. ээээээээ, 9э
//html = iconv.decode(html, 'windows-1251'); //c decodeEntities: false MMMMM MMMMMMMM: M. MMMMMMM, MM. MMMMMMMM, 9M
//html = iconv.decode(html, 'utf-8'); //MMMMM MMMMMMMM: M. MMMMMMM, MM. MMMMMMMM, 9M
const $ = cheerio.load(html); //, { decodeEntities: false });//расскомментить/закомментить
let wrp = $('div.wrp');
console.log($(wrp[1]).text());
if ($(wrp[1]).text().indexOf('д') > -1) console.log('дэ');
else console.log('хуй тебэ');
})
.catch(function(err) {
console.log(err);
});