mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-27 13:31:10 -05:00
MCWiki: fix crafting table parsing
This commit is contained in:
parent
ee59e5c6db
commit
19ae9f5cbe
@ -127,7 +127,7 @@ class MCInfo(callbacks.Plugin):
|
|||||||
maxitemlength = 0
|
maxitemlength = 0
|
||||||
|
|
||||||
# Now, parse the layout of the 3x3 crafting grid the wiki shows for items.
|
# Now, parse the layout of the 3x3 crafting grid the wiki shows for items.
|
||||||
for rowdata in crafting_data.div.span.span.children:
|
for rowdata in crafting_data.find_all('span', class_='mcui-row'):
|
||||||
rowitems = []
|
rowitems = []
|
||||||
# Iterate over the rows of the crafting grid, and then the items in each.
|
# Iterate over the rows of the crafting grid, and then the items in each.
|
||||||
for itemslot in rowdata.children:
|
for itemslot in rowdata.children:
|
||||||
@ -146,7 +146,7 @@ class MCInfo(callbacks.Plugin):
|
|||||||
maxitemlength = len(itemname)
|
maxitemlength = len(itemname)
|
||||||
|
|
||||||
rowitems.append(itemname)
|
rowitems.append(itemname)
|
||||||
elif itemslot.find('br'):
|
elif not itemslot.find('invslot-item'):
|
||||||
# Empty square.
|
# Empty square.
|
||||||
rowitems.append('')
|
rowitems.append('')
|
||||||
if rowitems:
|
if rowitems:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user