Where I am (adapted from first answer at how to scrape links with phantomjs):
phantom.create(function (ph) {
ph.createPage(function (page) {
page.open('http://www.' + currentSite + '.com', function (status) {
if(status == 'success'){
page.evaluate(function() { return [].map.call(document.querySelectorAll('a')); }, function (result) {
console.log(result);
});
....
But unfortunately the result is always coming up as null. Returning the whole document (or directly returning a querySelector on the document) causes my computer to hang up.
Thank you