调用Wiki API的应用程序

试图弄清楚为什么我无法从json对象中获取任何字符串,这是到目前为止的内容,在这种情况下为“ title”字符串:

function scrapeWiki() {
  var url = 'https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=help&format=json';
  var resp = UrlFetchApp.fetch(url);
  var data = resp.getcontentText();
  var json = JSON.parse(data);
  Logger.log(json.title);

还尝试了Logger.log(json [“ title”])无济于事。 谢谢!

baorry 回答:调用Wiki API的应用程序

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2389858.html

大家都在问