$ git clone git://github.com/ariya/phantomjs.git && cd phantomjs
$ sudo apt-get install pyqt-tools libqt4-dev python-qt4-dev python-qt4
$ qmake-qt4 && make
-- snip --
$ ./bin/phantomjs ./examples/fibo.js
1
1
2
3
5
8
13
21
34
..
$ /path/to/phantomjs ./dpz.js
http://portal.nifty.com/js/subtabcontents.txt:52 SyntaxError: Parse error
http://portal.nifty.com/2011/01/27/b/
http://portal.nifty.com/2011/01/20/a/
http://portal.nifty.com/2011/01/06/a/
$ /path/to/bin/phantomjs ./dpz.js | grep -v SyntaxError | xargs -n1 wget -m -np
-- snip --
$ ls -F
dpz.js portal.nifty.com/
$ find portal.nifty.com -type d
portal.nifty.com
portal.nifty.com/2011
portal.nifty.com/2011/01
portal.nifty.com/2011/01/06
portal.nifty.com/2011/01/06/a
portal.nifty.com/2011/01/06/a/img
portal.nifty.com/2011/01/20
portal.nifty.com/2011/01/20/a
portal.nifty.com/2011/01/20/a/img
portal.nifty.com/2011/01/27
portal.nifty.com/2011/01/27/b
portal.nifty.com/2011/01/27/b/img
$ find portal.nifty.com -type f -name "*.html"
portal.nifty.com/2011/01/06/a/index.html
portal.nifty.com/2011/01/20/a/index.html
portal.nifty.com/2011/01/27/b/index.html