从网络访问魔兽世界数据
我知道 WoW 附加编程社区,但我找不到任何有关从网络访问 WoW 数据库的 API 的文档。 我看到像 WoWHeroes.com 和 Wowhead 这样的第三方网站使用游戏数据(物品和角色数据库),所以我知道这是可能的。 但是,我不知道从哪里开始。 是否有我可以使用的 Web 服务,或者他们是否正在执行某种需要在其服务器环境中运行 WoW 客户端的幕后工作?
I'm aware of the WoW add-on programming community, but what I can find no documentation on is any API for accessing WoW's databases from the web. I see third-party sites like WoWHeroes.com and Wowhead use game data (item and character databases,) so I know it's possible. But, I can't figure out where to begin. Is there a web service I can use or are they doing some sort of under-the-hood work that requires running the WoW client in their server environment?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(12)
角色可以从军械库中挖掘,页面是xml。
物品是从本地安装游戏文件中挖掘的,至少 wowhead 是这样做的。
Characters can be mined from the armory, the pages are xml.
Items are mined from the local installation game files, that's how wowhead does it at least.
实际上,从哇军械库获取物品数据非常容易!
例如:
http://www.wowarmory.com/item-info.xml ?i=33135
查看页面的源代码(不是通过 Google Chrome,它通过 XSLT 显示转换后的 XML),您将看到 XML 数据!
您可以使用 搜索列表页面检索所有蓝色宝石,例如,然后使用 XML 解析器检索数据
It's actually really easy to get item data from the wow armory!
For example:
http://www.wowarmory.com/item-info.xml?i=33135
View the source of the page (not via Google Chrome, which displays transformed XML via XSLT) and you'll see the XML data!
You can use search listing pages to retrieve all blue gems, for example, then use an XML parser to retrieve the data
他们正在解析来自 www.wowarmory.com 的军械库信息。 没有官方的暴雪 API 可以访问它,但是有一个开源 PHP 解决方案可用(http://phparmory.sourceforge .net/)
They are parsing the Armory information from www.wowarmory.com. There is no official Blizzard API for accessing it, but there is an open source PHP solution available (http://phparmory.sourceforge.net/)
也许有点晚了,但为了将来的参考,请查看 WoW API 文档 http:// /blizzard.github.com/api-wow-docs/
抓取 HTML 和 XML 现在几乎已经过时,并且暴雪也不鼓励这样做。
Maybe a little late to the party, but for future reference check out the WoW API Documentation at http://blizzard.github.com/api-wow-docs/
Scraping HTML and XML is now pretty much obsolete and also discouraged by Blizzard.
文档:
http://blizzard.github.com/api-wow-docs/
享受
The documentation:
http://blizzard.github.com/api-wow-docs/
enjoy
类似的网站实际上从 Armory 获取数据。 如果您拉出任何项目、公会、角色等并在页面上执行“查看源代码”,您将看到返回的 XML 数据。 这是快速 C# 示例< /a> 如何获取数据。
Sites like those actually get the data from the Armory. If you pull up any item, guild, character, etc. and do 'View Source' on the page you will see the XML data coming back. Here is a quick C# example of how to get the data.
该第三方网站收集玩家的数据。 我认为这个集合基于魔兽世界的插件或每个玩家手动提交信息。
下一个选项是包装 wow 站点并解析来自网站 (HTML) 的信息。
This third-party site collection data from players. I think this collection based on addons for WoW or each player submit information manualy.
Next option is wraping wow site and parsing information from websites (HTML).
对于您的问题,这可能是错误的站点,但您正在考虑 wowarmory xml 的内容。 没有官方的wow api。 人们只是执行 httprequests 并获取 xml 来进行数字运算。 尝试谷歌搜索。 有一些已经为您编写的不同语言的库。 我知道 php/ruby 中有实现。 不久前我正在 .net 上开发一个项目,直到我分心了。 这是一篇总结了这一切的文章。
http://www.wow.com/2008/02/11/mashing-up-wow-data-when-we-can-get-it-in-outside-applications/
this is probably the wrong site for your question, but you're thinking of the wowarmory xml stuff. there is no official wow api. people just do httprequests and get the xml to do number crunching stuffs. try googling around. there are some libs out there in different languages that are already written for you. i know there are implementations in php/ruby. i was working on one in .net a while back until i got distracted. here's an article which kinda sums this all up.
http://www.wow.com/2008/02/11/mashing-up-wow-data-when-we-can-get-it-in-outside-applications/
Wowhead 和其他网站通常依赖于用户使用 wow 插件收集的数据。
Wowhead 还为其他网站提供了一种在悬停弹出窗口中引用该数据的方法,因此它们的内容可以在许多网站上重复使用。
由 Wowhead 提供支持
Wowhead and other sites generally rely on data gathered by users with a wow add-in.
Wowhead also has a way for other sites to reference that data in hover pop-ups, so their content gets reused on a number of sites.
Powered by Wowhead
对于实际的游戏内数据收集:
例如,thotbot 使用的是 cosmos.exe。 它可能使用某种形式的Windows hack(dll注入或其他东西)或嗅探数据包来确定丢弃了哪些项目等(拦截从wow服务器到客户端的流量并对其进行解码)。 它将这些数据保存在用户计算机上,然后上传到网络服务器进行存储。 我不知道是否为此类事情创建了任何开发库。
For actual ingame data collection:
cosmos.exe is what thottbot for example uses. It probably uses some form windows hack (dllinjection or something) or sniffs packets to determine what items have dropped and etc. (intercepts traffic from the wow server to your client and decodes it). It saves this data on the users computer and then uploads it to a webserver for storage. I don't know if any development libraries were created for this sort of thing.
像 Wowhead 和 WoWHearoes 这样的网站使用来自收集数据的玩家的客户端运行插件。 然后数据将发布到他们的网站上。 无法访问魔兽世界的数据库。 最好的选择是打开军械库并提取从搜索返回的 XML。 军械库只是返回的 xml 数据的 xml 转换。
Sites like Wowhead and WoWHearoes use client run addons from players which collect data. The data is then posted to their website. There is no way to access WoW's database. Your best bet is to hit the armory and extract the XML returned from your searches. The armory is just an xml transform on xml data returned.
暴雪最近(2011 年 8 月 15 日)在以下位置发布了其 RESTful API 的草稿文档:
http://blizzard.github.com/api-wow-docs/
API 涵盖了有关角色、物品、拍卖、公会、PVP 等的信息。
目前对 API 的请求限制为每天 3,000 个匿名使用,但有一个注册具有更多访问权限的合法需求的应用程序的过程。
更新(2019 年 1 月):新的暴雪 Battle.net 开发者门户位于:
https:/ /develop.battle.net/
请求限制和身份验证规则已更改。
Blizzard has recently (8/15/2011) published draft documentation for their RESTful APIs at the following location:
http://blizzard.github.com/api-wow-docs/
The APIs cover information about characters, items, auctions, guilds, PVP, etc.
Requests to the API are currently throttled to 3,000 per day for anonymous usage, but there is a process for registering applications that have a legitimate need for more access.
Update (January 2019): The new Blizzard Battle.net Developer Portal is here:
https://develop.battle.net/
Request throttling limits and authentication rules have changed.