From ecb313dd1f2bbc696daaa6ddf22af952b04625cb Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 4 Mar 2016 16:32:15 -0800 Subject: [PATCH] MCInfo: in 'recipes', use str.lower() before comparing text --- MCInfo/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MCInfo/plugin.py b/MCInfo/plugin.py index e4f2c7f..a7aaf3a 100644 --- a/MCInfo/plugin.py +++ b/MCInfo/plugin.py @@ -211,14 +211,14 @@ class MCInfo(callbacks.Plugin): # item. header = '' 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 else: irc.error("No recipes found.", Raise=True) for tag in header.next_siblings: # 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 = [] # Iterate over all the recipes shown and get their names.