PhantomJs没有给出完整的回应

时间:2017-05-12 06:53:06

标签: javascript phantomjs

我正在尝试使用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>作为回复而不是完整回复。我在这里做错了什么?

0 个答案:

没有答案