2011-05-26 13:08:33 +04:00
|
|
|
page = new WebPage()
|
|
|
|
|
|
|
|
page.open 'http://www.httpuseragent.org', (status) ->
|
|
|
|
if status isnt 'success'
|
|
|
|
console.log 'Unable to access network'
|
|
|
|
else
|
|
|
|
console.log page.evaluate -> document.getElementById('myagent').innerText
|
|
|
|
phantom.exit()
|