MediaWiki API正在从维基百科返回空的摘录。

问题描述 投票:1回答:1

本页返回的是一个空摘要。

https:/fr.wikipedia.orgwapi.php?action=query&prop=extracts&title=Alerte%20Rouge%20%28groupe%29&explaintext&rvprop=content&format=json。

但同样的查询对其他页面也有效。https:/fr.wikipedia.orgwapi.php?action=query&prop=extracts&title=?action=query&prop=extracts&title=B%C3%A9rurier_noir&explaintext&rvprop=content&format=json。

按照其他主题中的建议添加"&exlimit=max&exintro "并没有解决这个问题。

我是不是做错了什么?

api mediawiki wikipedia wikipedia-api
1个回答
3
投票

在法语维基百科上,"Alerte Rouge (groupe) "是重定向到 "Alerte rouge (groupe)"。

在重定向上请求摘录是行不通的。因此,你必须使用正确的标题,即 https:/fr.wikipedia.orgwapi.php?action=query&prop=extracts&title=Alerte%20rouge%20(groupe)&explaintext&format=json。

© www.soinside.com 2019 - 2024. All rights reserved.