Skip to content

Instantly share code, notes, and snippets.

@alt-romes
Created May 18, 2020 12:01
Show Gist options
  • Save alt-romes/6a0081ac5b250d0769ce4f48f354a125 to your computer and use it in GitHub Desktop.
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
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