英文:
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!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论