在 MediaWiki 搜索中指定偏移量

发布于 2025-01-08 02:53:55 字数 202 浏览 4 评论 0原文

我正在查询我们正在运行的 MediaWiki 实例。我正在为搜索

api.php?action=opensearch&search=afg&limit=100&format=xml

传递以下参数我没有看到任何方法将偏移量作为参数传递。有谁知道我们如何传递偏移量,或者是否有一个扩展可以使用并查询它以返回可以摄取到我的应用程序中的结果?

I'm querying a MediaWiki instance which we are running. I'm passing the following parameters for the search

api.php?action=opensearch&search=afg&limit=100&format=xml

I didn't see any way to pass the offset as a parameter. Does anybody know how we can pass a offset or if there is an extension which I can use and query it to return results which can be ingested in to my application?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

感性不性感 2025-01-15 02:53:55

opensearch api 不适用于连续查询,因此没有偏移参数。

但是,您可以使用 搜索模块(action=query)来获取结果,例如 Special :Search,你也会有一个偏移参数。

The opensearch api isn't made for contuing queries, so there is no offset parameter.

However, you can use the search module (of action=query) for results like in Special:Search, and there you will have an offset parameter, too.

箹锭⒈辈孓 2025-01-15 02:53:55

你可以使用这个:

https://en.wikipedia.org/w/api.php?action=query&list=search&prop=info&inprop=url&utf8=&format=json&origin=*&sroffset= 0&srlimit=5&srsearch=your_serch_value

0-5 之间的结果

这将为您提供下一页 ,您可以将偏移量设置为 5 并限制到 5

这将为您提供 5-10 之间的结果,依此类推...

you can use this:

https://en.wikipedia.org/w/api.php?action=query&list=search&prop=info&inprop=url&utf8=&format=json&origin=*&sroffset=0&srlimit=5&srsearch=your_serch_value

this will give you results between 0-5

next page you can set offset to 5 and limit to 5

this will give you results between 5-10, and so on...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文