Я пытаюсь поставить вместе скребок с nodejs и cheerio.У меня есть это до сих пор:
class ScrapperService {
static getDwelling(url) {
const dwelling = {
images: []
};
return new Promise((resolve, reject) => {
request(`https://www.zonaprop.com.ar/propiedades/${url}`, (err, resp, html) => {
if(err || resp.statusCode === 404) {
return reject(err);
}
const $ = cheerio.load(html);
pe = $('.price-operation', '#article-container').text();
dwelling.price = $('.price-items', '#article-container').text();
dwelling.description = $('.description-container', '#article-container').html();
//getting images here
$('#tab-foto-flickity').find('img').each(() => {dwelling.images.push(this);});
resolve(dwelling);
});
});
}
}
module.exports = ScrapperService;
проблема в том, что я получаю 37 пустых ссылок на ссылки на изображения, я пробовал разные теги, но не повезло.Любые идеи, где код не работает 