我可以做两件事:
- 使用发电机,我可以请求以特定标题的ID检索链接:
https://en.wikipedia.org/wikipedia.org/w/api.phpi.phpi.phpiaction.php? = klaksvik& gpllimit = 500& format = json
当然,我可以检索一个以上的标题,但是没有关于哪个链接的信息是指哪个标题。
- 我可以使用查询参数并检索带有每个请求标题的链接的JSON(带有映射):
https://en.wikipedia.org/w/api.php?action=query = query = query&
titles = egnland %20salisbury|问题是,没有IDS-仅适用于每个链接的标题。
我想结合这两个选项:响应包含有关链接哪个链接的信息,涉及每个链接的标题和pageID。
(第二个选项,但每个链接具有ID。)
There are two things I can do:
- Using a generator, I can make a request to retrieve links with ids for a specific title:
https://en.wikipedia.org/w/api.php?action=query&generator=links&titles=Klaksvik&gpllimit=500&format=json
Of course, I can retrieve links for more than one title, but there is no information about which link refers to which title.
- I can use a query parameter and retrieve JSON with links for each requested title (with mapping):
https://en.wikipedia.org/w/api.php?action=query&titles=England%20Salisbury|Klaksvik&prop=links
The problem is, that there are no ids - only titles for each link.
I want to combine these two options: the response contains both information about which link refers to which title and the pageid for each link.
(The second option but with id for each link.)
发布评论