Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

cheerio

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);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: vue electron name and icon 
Javascript :: jquery dynamic event binding 
Javascript :: get url parameter nuxt 3 
Javascript :: today date selected in datepicker 
Javascript :: number pattern js 
Javascript :: npm install could not resolve peerDependencies 
Javascript :: how to make first letter uppercase in javascript 
Javascript :: javascript trigger function when element is in viewport 
Javascript :: express js hello world example 
Javascript :: javascript round .5 down 
Javascript :: black adam 
Javascript :: An invalid form control with ... is not focusable. 
Javascript :: react mui icons 
Javascript :: how to validate from and to date using date.parse in javascript 
Javascript :: javascript integer 
Javascript :: array values js 
Javascript :: how to use for of in javascript 
Javascript :: create javascript array with 1 value 
Javascript :: subtrair datas javascript frontend 
Javascript :: jquery.mask.js 
Javascript :: js create md5 hash 
Javascript :: template literals in javascript 
Javascript :: how to add multiple elements to A new array javascript 
Javascript :: using cors as middleware in js 
Javascript :: get location from brwoser react 
Javascript :: mongodb replace document 
Javascript :: setinterval vs settimeout 
Javascript :: delay javascript 
Javascript :: javascript simple hash 
Javascript :: eval set global scope 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =