Skip to content

Instantly share code, notes, and snippets.

@tammyta

tammyta/index.js Secret

Created August 26, 2015 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tammyta/3f4331fc8733e65224d5 to your computer and use it in GitHub Desktop.
Save tammyta/3f4331fc8733e65224d5 to your computer and use it in GitHub Desktop.
Problem i have scraping with x-ray / x-ray-phantom
var phantom = require('x-ray-phantom');
var Xray = require('x-ray');
var x = Xray()
.driver(phantom());
x('https://empeopled.com/t/empeopled_news', '.topic-content', [{
title: '.post-title',
link: '.post-link@href',
}]).write('results.json')
{
"name": "empscraper",
"version": "1.0.0",
"description": "Bot scrapping empeopled",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "tammyta",
"dependencies": {
"x-ray": "^2.0.2",
"x-ray-phantom": "^1.0.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment