Last active
December 14, 2015 19:58
-
-
Save lvnilesh/5140047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl http://phantomjs.googlecode.com/files/phantomjs-1.6.1-linux-x86_64-dynamic.tar.bz2 | bunzip2 -c | tar x | |
mv phantomjs-1.6.1-linux-x86_64-dynamic phantomjs | |
cat > foo.js <<EOF | |
var page = require('webpage').create(); | |
url = 'http://vt.londhe.com'; | |
page.open(url, function (status) { | |
console.log("XXX", status); | |
}); | |
window.setTimeout(function () { | |
phantom.exit(); | |
}, 300*1000); | |
EOF | |
while true ; do ./phantomjs/bin/phantomjs foo.js & sleep 1 ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment