Skip to content

Instantly share code, notes, and snippets.

@uu59
Created January 29, 2011 07:44
Show Gist options
  • Save uu59/801655 to your computer and use it in GitHub Desktop.
Save uu59/801655 to your computer and use it in GitHub Desktop.
Usage: bin/phantomjs aa-stream.js
if (phantom.state.length === 0) {
var address = 'http://amachang.sakura.ne.jp/misc/aamaker/';
phantom.state = 'aamaker';
phantom.viewportSize = { width: 600, height: 100 };
phantom.open(address);
} else {
try {
setInterval(function(){
var m = document.getElementById('target').innerHTML;
console.log(m);
window.generate();
}, 1000);
} catch(e){
phantom.exit();
}
}
//
/*
$ ~/src/phantomjs/bin/phantomjs ./aa.js
|「◕ˇ△ˇ◕|「
┐(✿・ิ∀・ิ)┌
o| ̄∀ ̄✿|o
╮|๑´Д`๑|╭
|「'ー'|「
∩(╹∀╹▰)∩
^C
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment