node-osmosis icon indicating copy to clipboard operation
node-osmosis copied to clipboard

context object is not DOM element

Open thatisuday opened this issue 9 years ago • 1 comments

osmosis
.get(url)
.find('.story a')
.follow('@href')
.find('#newsDescriptionContainer')
/*.set({
    'title'         :  '.ins_headline>h1',
    'imgUrl'        :  '.story_image_main',
    //'body'            :  '.ins_storybody'
})*/
/*.data(function(listing) {
    //console.log(colors.yellow(JSON.stringify(listing)));
    fs.appendFileSync('data.txt', JSON.stringify(listing) + '\n\n\n\n');
})*/
.then(function(context, data, next){
    //var title = context.find('.ins_headline>h1');
    console.log(context);

    next(context, data);
})

but context is showing below objecr

{ last: true, index: 0 }

thatisuday avatar Oct 12 '16 10:10 thatisuday

@thatisuday console.log('context.__proto__', context.__proto__)

roblav96 avatar Dec 30 '16 06:12 roblav96