Skip to content

Instantly share code, notes, and snippets.

@Tiorzfk
Created June 1, 2017 07:29
Show Gist options
  • Save Tiorzfk/5769a80cb6c9c9c02c5e77002ee250f2 to your computer and use it in GitHub Desktop.
Save Tiorzfk/5769a80cb6c9c9c02c5e77002ee250f2 to your computer and use it in GitHub Desktop.
var express = require('express');
var Xray = require('x-ray');
var x = Xray();
var app = express();
app.get('/new-movie-soon', function(req, res){
x('http://www.imdb.com/movies-coming-soon/?ref_=nv_mv_cs_4','div .list_item', [{
title: 'tbody h4',
description: 'tbody .outline',
director: 'tbody .txt-block',
director_description: x('tbody .txt-block a@href', 'tbody #name-bio-text'),
link: 'tbody h4 a@href'
}])(function(err, data) {
return res.json(data);
})
});
module.exports = app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment