-
Project Hosting on Google Code javascript utility commandline Wednesday, January 26, 2011
Project Hosting on Google Code
Project Hosting on Google Code
javascript utility commandline
Jan 26, 2011
Extracted Page: http://code.google.com/p/phantomjs/
Project Hosting on Google CodePhantomJS is a minimalistic, headless, WebKit-based, JavaScript-driven tool.
It has native support for different web technologies: DOM handling, CSS selector, JSON, Canvas, SVG, and of course JavaScript.
Here is a short PhantomJS script which lists recent tweets:
if (phantom.state.length === 0) {
phantom.state = 'tweets';
phantom.open('http://mobile.twitter.com/mr3bc');
} else {
var list = document.querySelectorAll('span.status');
for (var i = 0; i < list.length; ++i)
console.log((i + 1) + ': ' + list[Additional text has been truncated due to copyright reasons. Things without URLs and private things don't get truncated.