mediawiki - 缺少来自 Wikipedia API 的重定向
问题描述
我正在尝试通过以下查询获取 Wikipedia 页面的重定向:
如您所见,“加拿大投资行业监管组织”页面没有重定向:
"18847030": {
"pageid": 18847030,
"ns": 0,
"title": "Investment Industry Regulatory Organization of Canada",
"index": 1,
"pageprops": {
"page_image": "Investment_Industry_Regulatory_Organization_of_Canada_Logo.jpg",
"wikibase_item": "Q16987312"
},
"description": "organization",
"descriptionsource": "central"
}
但是,如果转到https://en.wikipedia.org/wiki/IIROC,我会被重定向到https://en.wikipedia.org/wiki/Investment_Industry_Regulatory_Organization_of_Canada。
那么为什么“IIROC”不包含在“Investment_Industry_Regulatory_Organization_of_Canada”的重定向中?
谢谢
解决方案
您应该继续您的道具查询,直到批处理完成。
我通过继续查询直到https://en.wikipedia.org/w/api.php?action=query&format=json&prop=pageprops%7Cdescription%7Credirects&continue=%7C%7Cpageprops%7Cdescription&generator=search&redirects=1&rdcontinue=Financial_adviser达到以下结果%7C52889338&gsrsearch=iiroc&gsrlimit=10
"18847030": {
"pageid": 18847030,
"ns": 0,
"title": "Investment Industry Regulatory Organization of Canada",
"index": 1,
"redirects": [
{
"pageid": 18855542,
"ns": 0,
"title": "IIROC"
},
{
"pageid": 18936209,
"ns": 0,
"title": "Investment Dealers Assocation of Canada"
},
{
"pageid": 18936308,
"ns": 0,
"title": "Investment Dealers Assocation"
},
{
"pageid": 18936769,
"ns": 0,
"title": "Investment Dealers Association of Canada"
}
]
},