用 Blogger API 修改博客文章
前言
当时没有实现自动方案, 最终的修改是人肉手动的.
思路
Blogger 有 API 可以用.
在 AI "手把手"的陪伴下, 我启用了Blogger API, 设置了 OAuth 权限, 下载了 OAuth 凭据. 然后就开始让 hermes 来操作 blog
先简单测试了一下发布blog. OK
添加一些测试文章
假设你处于不知道 https://icdyct.blogspot.com/ 上面已经发表了什么内容 的状态,你做这样一件事情遍历这个博客的每篇文章如果文章的url是 表格中的 page, 那么在文章末尾添加以下表格中的 link1, link2, link3这个表格是| page | link1 | link2 | link3 |
| 页面 | 链接1 | 链接2 | 链接3 | | 页面|---|------|------|-----|| https://icdyct.blogspot.com/2026/04/test-4.html | https://icdyct.blogspot.com/2026/04/test-5.html | https://icdyct.blogspot.com/2026/04/test-6.html | https://icdyct.blogspot.com/2026/04/test-7.html || https://icdyct.blogspot.com/2026/04/test-5.html | https://icdyct.blogspot.com/2026/04/test-6.html | https://icdyct.blogspot.com/2026/04/test-7.html | https://icdyct.blogspot.com/2026/04/test-8.html || https://icdyct.blogspot.com/2026/04/test-6.html | https://icdyct.blogspot.com/2026/04/test-7.html | https://icdyct.blogspot.com/2026/04/test-8.html | https://icdyct.blogspot.com/2026/04/test-4.html || https://icdyct.blogspot.com/2026/04/test-7.html | https://icdyct.blogspot.com/2026/04/test-8.html | https://icdyct.blogspot.com/2026/04/test-4.html | https://icdyct.blogspot.com/2026/04/test-5.html |先不要实施, 先和我讨论你准备怎么做
结果符合预期
========后记
打开Blogger API, 设置 OAuth 的操作还挺繁琐的. 我卡了好多壳.
但是, 这次我没有在网上找教程. 而是和 hermes 对话, hermes 接了一个能看图的模型 kimi-k2.6
最后, 我在网页版免费的chatgpt里也尝试了一下, 也是可以辅助我的.
评论
发表评论