0

我正在向已发布的谷歌表格发送 GET 请求。所有教程都显示返回了一个 JSON 对象,但我收到了 HTML。是因为更新吗?如何将其解析为 JSON?

发布表:https ://docs.google.com/spreadsheets/d/e/2PACX-1vTLSQ-WGM8O0iCCTal0eFoAvFFIVK04UxUiCuBJLGVy89EY301-0cF5PZupIXh-sF_L9pHIw6tVtN1G/pubhtml

转到链接时的预期输出:JSON 对象

获得的输出:HTML

参考资料: https ://sandbox.idre.ucla.edu/sandbox/general/databasing-google-spreadsheets-to-json

https://medium.com/storyline-blog/how-to-create-a-dynamic-alexa-skill-using-google-sheets-and-storyline-9fd37f2080d8

在这些中,当我收到 HTML 时发出请求时返回 JSON

google sheet 返回 JSON 的示例:

https://spreadsheets.google.com/feeds/list/SPREADSHEET_ID/od6/public/basic?alt=json

4

1 回答 1

0

当您发布 google sheet 时,系统会弹出一个显示链接的提示,例如

https://docs.google.com/spreadsheets/d/e/2PACX-1vTVZ3fWRSMu5nFGUc05ACV1h0-UGW49wi9lHAyJVUMp8FX3TANqy_9WNhkcd4z1mJSSN-LZyyBdS_vK/pubhtml

2PACX-1vTVZ3fWRSMu5nFGUc05ACV1h0-UGW49wi9lHAyJVUMp8FX3TANqy_9WNhkcd4z1mJSSN-LZyyBdS_vK不是技能ID

技能 ID 显示在搜索栏中。例如搜索栏有链接,https://docs.google.com/spreadsheets/d/1bm6Fjiacmuh0qRjuHoBU35AHPdF7S4R7BEIK46H0wUo/edit#gid=0

其中1bm6Fjiacmuh0qRjuHoBU35AHPdF7S4R7BEIK46H0wUo 是链接。

于 2020-03-04T11:35:15.763 回答