I have been attempting to retrieve a response from the following URL using PhantomJS:-
https://www.trivago.com/api/v1/bin/accommodation/2891353/deals?iPathId=34812&iRoomType=1&aRooms=&aDateRange%5Barr%5D=2017-05-24&aDateRange%5Bdep%5D=2017-05-25&bSharedRooms=false
This is the PhantomJS code I am using:-
var system = require('system');
var webPage = require('webpage');
var page = webPage.create();
var url = system.args[1];
page.viewportSize = {
width: 1280,
height: 720
};
page.open(url, function (status) {
var content = page.content;
console.log(content);
phantom.exit();
});
However, instead of receiving the full response, all I am getting is
<html><head></head><body></body></html>
. What could be causing this issue?