-->

检索从导出的维基百科文章的跨语言链接?(Retrieving the Interlanguage l

2019-09-16 05:47发布

我使用的解析与一些正则表达式的出口来检索导出的维基百科文章的语言链接。

在第1阶段维基数据项目 ,这些环节都被移动到维基数据一个独立的页面。

例如文章矿石山没有语言的联系在了出口。 语言链接现在都在Q4198 。

我怎样才能导出语言链接?

Answer 1:

现在我们鼓励您使用维基数据API: http://wikidata.org/w/api.php

对于你的情况,使用道具=标签 。 这个网址是自explicative:

http://www.wikidata.org/w/api.php?action=wbgetentities&sites=enwiki&titles=Ore%20Mountains&languages=cs|de|es|fr|it|pl|pt|ru&props=labels&format=xml


Answer 2:

我利用出口到API改变。 你可以检索与财产“langlinks”,像这样的interwikilanguage链接:

http://en.wikipedia.org/w/api.php?action=query&titles=Ore%20Mountains&prop=langlinks



文章来源: Retrieving the Interlanguage links from an exported Wikipedia article?