xuv's notebook

Side notes, howtos and random bits of information related to Julien Deswaef's projects

User Tools

Site Tools


projects:love_machine

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
projects:love_machine [2014/01/19 21:28] – [Do you need a reason to run it?] Julien Deswaefprojects:love_machine [2014/05/04 14:08] – [Installation] Julien Deswaef
Line 38: Line 38:
   * Casperjs   * Casperjs
   * Phantomjs   * Phantomjs
-  * Node 
   * A facebook account   * A facebook account
 +
 +Here is a little tutorial on how to install CasperJs and PhantomJs on Debian stable: https://www.dvdheiden.nl/2013/07/30/installing-phantomjs-and-casperjs-on-linux/
  
 == Usage: == == Usage: ==
 +
 +If you just want to run it by "hand", go into the directory where you downloaded the loveMachine and execute this command:
 <code bash>caserjs loveMachine.js --email=<fb_login> --password=<fb_password></code> <code bash>caserjs loveMachine.js --email=<fb_login> --password=<fb_password></code>
 +
 +If you want to setup a cron every hour, you will have to write a crontab like this:
 +<file txt loveCron>0 */1 * * *  PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs /usr/local/bin/casperjs /home/juego/loveMachine/casperjs/loveMachine.js --email=<fb_login> --password=<fb_password> > loveMachine.log</file>
 +
 +You'll have to also set this line at the beginning of loveMachine.js file to an absolute path:
 +
 +<code javascript>
 +var casper = require('casper').create({
 +    clientScripts: [
 +        'include/jquery-1.10.2.min.js' // <- Change this to an absolute path 
 +    ],
 +</code>
 +
 +
  
 ==== Links === ==== Links ===
projects/love_machine.txt · Last modified: 2015/12/28 21:39 by Julien Deswaef