Blogger (Python) API:如何通过帖子 ID 检索帖子?
之前通过调用 gdata.blogger.client.add_post()
获得了帖子 ID...
post = client.add_post(...)
post_id = post.get_post_id()
...以后如何使用该帖子 ID 来检索帖子?我认为也许 gdata.blogger.client.Query 是可行的方法,但这不支持帖子 id 作为查询项。随 Python gdata
模块分发的示例代码没有此用例的示例,在研究了 gdata.blogger.client.*
一段时间后,我'我没有取得太大进展。
显然,我可以遍历博客中的所有帖子,直到找到具有相应 ID 的帖子,但这将是一个非常非常糟糕的想法。
Having previously obtained a post ID from a call to gdata.blogger.client.add_post()
...
post = client.add_post(...)
post_id = post.get_post_id()
...how do I use that post id to retrieve the post in the future? I thought maybe gdata.blogger.client.Query
would be the way to go, but this doesn't support post id as a query term. The example code distributed with the Python gdata
module doesn't have an example of this use case, and after poking around gdata.blogger.client.*
for a while I'm not making much progress.
I could obviously iterate through all the posts in the blog until find the one with the corresponding id, but that would be a terrible, terrible idea.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
继续我的主题,回答我自己的问题......
经过大量的摆弄,看起来这是一个解决方案。给定:
您可以这样做:
Continue my theme of answering my own questions...
After lots of fiddling, it looks like this is one solution. Given:
You can do this: