如何获取给定页面 id 的当前文本
我有一个机器人,可以直接从数据库分析某些页面的当前文本。页面 ID 是已知的。过去,机器人使用 where revision.rev_id = page.page_latest && text.old_id = revision.rev_text_id
。 Mediawiki 更新后,该机器人不再工作。
现在,成员 revision.rev_text_id
已丢失。 docu 告诉我们,text.old_id
是现在由表格内容引用。我现在的问题是,找到从 page_id
到表 content
的方法。
I have a bot, that analyses the current text of some pages directly from database. The page ids are known. In the past the bot used where revision.rev_id = page.page_latest && text.old_id = revision.rev_text_id
. After an Mediawiki update, the bot doesn't work anymore.
Nowadays member revision.rev_text_id
is missed. The docu tells, that text.old_id
is now referenced by table content. My problem is now, to to find a way from page_id
to table content
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发布问题后,我继续我的调查,再次阅读文档并找到了解决方案(表
slots
):但它比旧机器人慢得多(在同一服务器上测试):7分钟而不是11274 页需要 1.55 秒。也许我添加一些索引。
编辑
使用
alter table slot add index (slot_origin)
添加密钥后,该过程需要 1.162 秒(比旧机器人快一点)。After posting the question, I continued mý investigation, read the docu again and found the solution (table
slots
):But it is much slower than the old bot (tested on same server): 7 min instead of 1.55s for 11274 pages. Maybe I add some indexes.
EDIT
After adding a key with
alter table slots add index (slot_origin)
the process needs 1.162s (a little bit faster than the old bot).