hi am testing the new x ray web scraping , following the listed tutorial for crawling to another website , does not return anything github x-ray
var Xray = require('x-ray');
var x = Xray();
x('http://google.com', {
main: 'title',
image: x('#gbar a@href', 'title'), // follow link to google images
})(function(err, obj) {
/*
{
main: 'Google',
image: 'Google Images'
}
*/
})
does not work , besides this is my code ,for the same logic
var html='http://www.myjoyonline.com/news.php';
x(html,'ul.opinion-listings li' ,[{
title : '.head .title a',
desc : '.info',
date : '.head',
img :'.image-inner a img@src',
url :'.head .title a@href',
fullStory : x('.head .title a@href', 'title'),
}])(function(err, obj) {
console.log(obj);
});