这可能是一个广泛的问题,但我会尝试尽可能具体。
我创建了一个商店类型应用程序,列出了Minecraft mods。我当前存储商店信息的方式是在.json文件中,其中声明了我的应用程序读取的不同变量并将它们列入列表框。
但是,这里显而易见的问题是,每当我需要添加新的mod或更新它时,我都必须手动更新这个.json文件。我想知道是否有可能在spigotmc.org等网站上搜索所有下载内容,并从中获取以下信息。
{
"productName": "SupplyDrop",
"category": "Chat",
"version": "4.6",
"minecraftVersions": ["1.8", "1.9"],
"API": ["CraftBukkit", "Spigot"],
"downloadLink": "https://www.spigotmc.org/resources/supplydrop-1-8-1-9.23455/download?version=90759",
"spigotLink": "https://www.spigotmc.org/resources/supplydrop-1-8-1-9.23455/",
"description": "Supply Drop is a very useful plugin for any survival server, especially factions servers. What it does is it randomly drops a chest around the map that contains items in it, for one player to find and receive!",
"imageLink": "https://www.spigotmc.org/data/resource_icons/23/23455.jpg",
"longDescription": "Supply Drop is a very useful plugin for any survival server, especially factions servers. What it does is it randomly drops a chest around the map that contains items in it, for one player to find and receive! This plugin can bring the competitiveness out in your players as they compete for the chest!"
}
这是个别项目存储在文件中的方式。
如上所述,如果可能的话,我希望能够为spigotmc.org自动搜索所有mod并获取信息并将其翻译成此系统。
这甚至是远程可能吗?
答案 0 :(得分:1)
如果您只需要数据,可以使用网络剪贴器工具,例如智胜, Import.io ,和服。
或者,如果您需要自己开发,可以使用Regex, HtmlAgilityPack
。
您还可以查看Articles,这可能会对您有所帮助。