📅  最后修改于: 2022-03-11 15:03:45.537000             🧑  作者: Mango
var request = require('request'), cheerio = require('cheerio');
//ÐагÑÑжаем ÑÑÑаниÑÑ
request({uri:'http://www.amazon.com/', method:'GET', encoding:'binary'},
function (err, res, page) {
//ÐеÑедаÑм ÑÑÑаниÑÑ Ð² cheerio
var $=cheerio.load(page);
//ÐдÑм по DOM-деÑÐµÐ²Ñ Ð¾Ð±ÑÑнÑми CSS-ÑелекÑоÑами
img_src=$('div.s9a3 > div > div > a > div > div > img').attr("src");
console.log(img_src);
});