从网站收集特定信息并将其显示在我的网站上
我在这个领域仍然是一个新手,但我已经搜索了很长时间并且似乎找不到任何东西,所以这里的任何帮助将不胜感激。
基本上,我有一个体育 WordPress 网站,我有一个包含棒球运动员姓名列表的页面,每天晚上结束时,我需要用他们当天/晚上所玩的比赛的统计数据更新此列表。
例如(在他们比赛之前)...
捕手:Russell Martin
一垒手:Mark Texeira
游击手:Derek Jeter
...等等大约 50 个其他名字。
每天晚上结束时,我必须去搜索那些球员并找出他们当晚的统计数据,然后通过输入所有这些统计数据来更新列表。
例如(在他们打完比赛后)...
捕手:拉塞尔·马丁 - 2 个单打,1 个本垒打
一垒手:马克·特塞拉 - 1 个双
垒手:德里克·杰特 - 2 个本垒打
...等等 50 个其他名字。
我在哪里或如何找到或创建脚本或插件或从另一个站点收集此特定数据(统计数据)并将其显示在我的站点上的东西?
也许这个资源会有用,但我不知道,因为当我尝试阅读它时我不明白它:
http://developer.yahoo.com/fantasysports/guide/
http://developer.yahoo.com/fantasysports/guide/players-collection.html
任何帮助、反馈、任何事情都将不胜感激。
谢谢, 托尼
I'm still kind of a rookie in this field but I've been searching for a very long time and can't seem to find anything so any help here will be greatly appreciated.
Basically, I have a wordpress website for sports and I have a page with a list of baseball players names and at the end of every night I need to update this list with their statistics from the game they played that day/night.
For example (before they play their games)...
Catcher: Russell Martin
First baseman: Mark Texeira
Shortstop: Derek Jeter
...and so on for like 50 other names.
At the end of every night, I have to go search for those players and find out what their statistics were for the night and then update the list by typing in all of those statistics.
For example (after they played their games)...
Catcher: Russell Martin - 2 singles, 1 home run
First baseman: Mark Texeira - 1 double
Shortstop: Derek Jeter - 2 home runs
...and so on for like 50 other names.
Where or how can I find or create a script or plugin or something that will collect this specific data (stats) from another site and and display it on mine?
Maybe this resource would be useful but I don't know because I don't understand it when I try to read it:
http://developer.yahoo.com/fantasysports/guide/
http://developer.yahoo.com/fantasysports/guide/players-collection.html
Any help, feedback, anything will be greatly appreciated.
Thanks,
Tony
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过几种方式做到这一点。
雅虎! Fantasy Sports API 确实是一个不错的选择 - 如果您要(单独)发布有关 Yahoo! 的具体问题! API,关于您需要什么帮助,您可能会在这方面获得更多帮助。
另一种方法是页面抓取,它基本上涉及以编程方式转到具有所需统计信息的页面(与在 Web 浏览器中执行此操作的方式相同),并解析 HTML 以获取正确的统计信息玩家。然而,这有两个主要问题:
因此,雅虎! API确实是一条出路。如果文档让您感到困惑,我建议您先阅读 此小节显示用于获取特定于玩家的数据的 URI,然后通过谷歌搜索其他人的代码示例以了解该去哪里。
You could do this a couple of ways.
The Yahoo! Fantasy Sports API is really the way to go - if you were to post specific questions (separately) about the Yahoo! API, regarding what you need help with, you might get more help on that end.
The other way to do it is page scraping, which basically involves programmatically going to a page that has the stats you want (the same way you would do it in your web browser), and parsing the HTML to get the right stats for the right players. This has two major problems, however:
So, the Yahoo! API really is the way to go. If the documentation baffles you, I would suggest starting by reading through this sub-section that shows the URIs for getting the player-specific data, followed by googl'ing for other people's code samples to get an idea of where to go.