Created
May 18, 2020 12:01
-
-
Save alt-romes/6a0081ac5b250d0769ce4f48f354a125 to your computer and use it in GitHub Desktop.
Script to get all items from minecraft and print them as SQL insert commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
allitemsHTML = requests.get('https://minecraft-ids.grahamedgecombe.com/').text | |
import re | |
items = re.findall('class="name">(.*?)<.*?class="text-id">\((.*?)\)</', allitemsHTML) | |
for i in range(len(items)): | |
print('item id {}, item name {}, item type {}'.format(i, items[i][0], items[i][1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment