wikipedia api search titles generator

≯℡__Kan透↙ 提交于 2019-12-06 06:11:24

问题


Trying to search tiles through the api using a generator. I notice that there are two possible generators, with both I have problems:

  • prefix search - doesn't work well if I have multiple words and the order is reversed in the query (for example "brian adams" would return an answer, however "adams brian" does not
  • search - seems to not allow searching by titles, only by text which returns low-quality results.

Anyone knows of a way around this?


回答1:


"srwhat=title" is disabled, so you should use "intitle:" in your search query:

https://en.wikipedia.org/w/api.php?action=query&list=search&srnamespace=0&srprop=timestamp&&srsearch=intitle:adams%20brian

for more info please check this page:

https://www.mediawiki.org/wiki/API:Search



来源:https://stackoverflow.com/questions/27624431/wikipedia-api-search-titles-generator

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