Mediawiki API error: Unrecognized value for parameter 'prop': extracts

别来无恙 提交于 2019-12-10 19:54:17

问题


I have a new installation of mediawiki. I am trying to use the API to simply get an article. The API url I am using is:

https://example.com/mediawiki/api.php?action=query&format=json&prop=extracts&titles=Vendor_cisco

Upon going to that URL I get: Unrecognized value for parameter 'prop': extracts

This seems odd because all of the following urls do work and return the right data:

https://example.com/mediawiki/api.php?action=query&format=json&prop=links&titles=Vendor_cisco https://example.com/mediawiki/api.php?action=query&format=json&prop=categories&titles=Vendor_cisco https://example.com/mediawiki/api.php?action=query&format=json&prop=revisions&titles=Vendor_cisco

How do I get the body and text from my article? I was under the impression prop=extracts is what is used.


回答1:


prop=extracts is part of TextExtracts extension (formerly MobileFrontend extension). If you don't have that extension installed, you won't be able to use prop=extracts.



来源:https://stackoverflow.com/questions/15960533/mediawiki-api-error-unrecognized-value-for-parameter-prop-extracts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!