有没有工具/API可以提取Minecraft的合成配方?

huangapple go评论136阅读模式
英文:

Is there a tool/API to extract Minecraft recipes?

问题

一个朋友和我决定使用JDA在Java中编写一个Discord机器人。想法是让机器人提供Minecraft的合成配方请求(配方的图片)。然而,我们不想下载每一个配方(它们实在是太多了)。所以我想知道是否有一些我们可以使用的东西,可以提供带有图片等所有内容的配方,比如一个可以从Java代码访问并返回可用内容的API或网站。(没有附加代码,因为我们实际上还没有做任何事情,这没有任何意义)。

英文:

A friend and I decided to code a discord bot in Java, using JDA. The idea is for the bot to give you a request Minecraft recipe (a picture of it). However, we don't want to have to download every single recipe (there are way too many of them). So I was wondering if there's something we can use that would give us the recipes with pictures and everything, like an API or a website that we can access from the Java code that would return something we can use. (No code attached since we haven't really done anything and it would serve no purpose).

答案1

得分: 0

我不确定是否存在一个可以为您完成这项任务的API。如果问题是花费时间下载每个单独的食谱,我可能会建议创建一个网络爬虫,可以从您那里获取数据。使用Python和BeautifulSoup(https://pypi.org/project/beautifulsoup4/),从https://www.minecraftcrafting.info/这样的网站获取图像将会相当简单。希望对您有所帮助,祝您好运!

英文:

I am not sure if an API exists that can do that for you. If the problem is spending the time to download every single recipe I might recommend creating a webscraper that could get that data from you. Getting the images from a site like https://www.minecraftcrafting.info/ would be fairly straight forward using python and beautifulsoup (https://pypi.org/project/beautifulsoup4/). Hope that helps and good luck!

huangapple
  • 本文由 发表于 2020年8月18日 21:59:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/63470274.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定