我正在尝试使用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
phantomjs代码: -
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();
});
但我只收到<html><head></head><body></body></html>
作为回复而不是完整回复。我在这里做错了什么?