以前,我的App Script项目运行完美,但是现在结果是一个空数组。当我在浏览器中使用相同的链接时,答案是正确的。
这是我的相关摘要:
var result = UrlFetchApp.fetch('https://completion.amazon.co.uk/search/complete?search-alias=aps&client=amazon-search-ui&mkt=3&q=cellulite&qs=&cf=1&fb=1&sc=1&',
{
'muteHttpExceptions': true,
'contentType': "jsonp"
}).getContentText();
Logger.log(result);
哪个产量
[cellulite, [], [], []]
但是,如果我使用browser中的链接,答案是:
[ "cellulite",
[ "cellulite massager",
"cellulite cream",
"cellulite",
"cellulite brush",
"cellulite cup",
"cellulite remover",
"cellulite massager brush",
"cellulite oil",
"cellulite cupping therapy",
"cellulite brush dry"
],
[ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
[],
"40N0Y0SNGX6"
]
如果相同的URL可以正常工作,为什么result
为空?