mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-26 13:01:07 -05:00
MCInfo: in 'recipes', use str.lower() before comparing text
This commit is contained in:
parent
a82a753972
commit
ecb313dd1f
@ -211,14 +211,14 @@ class MCInfo(callbacks.Plugin):
|
|||||||
# item.
|
# item.
|
||||||
header = ''
|
header = ''
|
||||||
for header in soup.find_all('h3'):
|
for header in soup.find_all('h3'):
|
||||||
if header.span and header.span.get_text().strip() == 'Crafting ingredient':
|
if header.span and header.span.get_text().strip().lower() == 'crafting ingredient':
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
irc.error("No recipes found.", Raise=True)
|
irc.error("No recipes found.", Raise=True)
|
||||||
|
|
||||||
for tag in header.next_siblings:
|
for tag in header.next_siblings:
|
||||||
# Only look at crafting table UIs after this header.
|
# Only look at crafting table UIs after this header.
|
||||||
if tag.name == 'table' and tag.get("data-description") == 'Crafting recipes':
|
if tag.name == 'table' and tag.get("data-description").lower() == 'crafting recipes':
|
||||||
recipes = []
|
recipes = []
|
||||||
|
|
||||||
# Iterate over all the recipes shown and get their names.
|
# Iterate over all the recipes shown and get their names.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user