【问题标题】:Mediawiki search by infobox propertyMediawiki 按信息框属性搜索
【发布时间】:2015-09-04 06:20:46
【问题描述】:

我想使用特定类别的搜索词(例如:歌曲)搜索媒体 wiki api。

搜索词,我正在尝试使用歌曲名称和艺术家的组合

搜索词 =“歌曲名称”+“艺术家”

https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=xmlfm&titles=Why%20This%20Kolaveri%20Di%20&rvsection=0

上面的 api 给出如下信息框信息

{{Infobox song
| Name = ''Why This Kolaveri Di''
| Cover = 
| Caption- = Screenshot of the song
| Artist = [[Dhanush]]
| Album = [[3 (2012 Indian film)|3]]
| URL =
| A-side =
| B-side =
| country = India
| Released = 16 November 2011
| Format = [[Music download|Digital download]]
| track_no = 1
| Recorded = [[2011 in music|2011]] at [[Panchathan Record Inn and AM Studios|AM Studios]], [[Chennai]]
| Genre =
| Length = 4:09
| Label = [[Sony Music Entertainment|Sony Music]]
| Producer = [[Anirudh Ravichander]]
| Writer = [[Dhanush]]
| Composer = [[Anirudh Ravichander]]
| Language = [[Tanglish]]
| Chart position =
| prev =
| prev_no = 2
| Misc =
{{External music video|{{YouTube|YR12Z8f1Dh8|"Why This Kolaveri Di"}}|Type=song}}
}}

我正在尝试从中提取信息。

所以我的问题是如何查询以搜索相关页面并在单个查询中获取信息框数据。是否可以在单个查询中使用还是我需要使用多个查询!

【问题讨论】:

    标签: mediawiki mediawiki-api


    【解决方案1】:

    您需要将搜索查询用作generator(基本上将两个查询中的参数合并,并将搜索查询中的所有参数名称添加到g)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多