I want try to get tennis players description from wikipedia without scratch the DOM page on a player x. It's not allowed and very boring. So, I hope someone can reply to my only question.

我想尝试从wikipedia获得网球运动员的描述,而不是划痕玩家x上的DOM页面。这是不允许的,也很无聊。所以,我希望有人可以回复我唯一的问题。

What can I do precisly with the Wikipedia API ? Can I get informations about a collection of tennis players easily ? or this API is not working for this. If not, I need someone tells me what is the purpose of this API because I don't understand the documentation.

我可以准确地使用维基百科API做什么?我可以轻松获得有关网球运动员的信息吗?或者这个API不起作用。如果没有,我需要有人告诉我这个API的目的是什么,因为我不懂文档。

2 个解决方案

#1


2

Take a look at the Wikipedia API Sandbox - with that you can play around and try to get the info you need.

看看维基百科API沙盒 - 你可以玩,并尝试获取所需的信息。

To get the info from a page, you can use the parse action.

要从页面获取信息,您可以使用解析操作。

Trying to get the information for the danish tennisplayer Caroline Wozniacki, I used the parse action along with the json format.
In the field labeled page I pasted Caroline_Wozniacki and I pressed Make Request.

为了获得丹麦网球运动员Caroline Wozniacki的信息,我使用了解析动作和json格式。在标记页面的字段中,我粘贴了Caroline_Wozniacki并按下了Make Request。

This gives me this URL: http://en.wikipedia.org/w/api.php?action=parse&format=json&page=Caroline_Wozniacki
This contains the page with links, references and all in JSON format.

这给了我这个URL:http://en.wikipedia.org/w/api.php?action =arse&format = json&page = Caroline_Wozniacki这包含带有链接,引用和所有JSON格式的页面。

更多相关文章

  1. 刷新php页面而不重载内容?
  2. 如何通过PHP将HTML页面作为字符串获取?
  3. thinkphp执行删除操作然后成功success后页面跳转失败问题
  4. 在通过AJAX响应发送的页面上执行javascript函数
  5. 使用jQuery和ajax更改浏览器地址栏URL,无需重载页面[重复]
  6. 阅读使用JavaScript生成的页面
  7. PHP教程之PHP调用session_start后页面始终加载的问题研究
  8. jQuery ajax调用不会调用我的php页面
  9. 使用安全的会话-cookie在HTTP和HTTPS页面之间切换

随机推荐

  1. 如何写高质量的代码(完结)
  2. 多线程基础必要知识点!看了学习多线程事半
  3. 想要的资源就在那,为什么你总是搜不到?
  4. 三十
  5. Nacos-Sync介绍及部署
  6. 桥接模式在开源代码中的应用
  7. 最新JGJ311-2013Word版建筑深基坑工程施
  8. 项目中如何实现读写分离?怎么配置?
  9. 期待周末,补个觉、撸篇文
  10. AQS简简单单过一遍