From aaf74c418c2edc4e7a8dafb9b3440a2609ccc0fe Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Fri, 4 Oct 2019 09:40:35 -0400 Subject: [PATCH] test --- sopel_modules/SpiceBot_Core_Tools/HTTP_Codes.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sopel_modules/SpiceBot_Core_Tools/HTTP_Codes.py b/sopel_modules/SpiceBot_Core_Tools/HTTP_Codes.py index 65e4210..d9e72c2 100644 --- a/sopel_modules/SpiceBot_Core_Tools/HTTP_Codes.py +++ b/sopel_modules/SpiceBot_Core_Tools/HTTP_Codes.py @@ -53,13 +53,10 @@ def fetch_result(query): tree = html.fromstring(r.content) - title = tree.xpath((basic_xpath)) - return str(title) - try: title = tree.xpath((basic_xpath)) - # if isinstance(title, list): - # title = title[0] + if isinstance(title, list): + title = title[0] # title = str(title) # for r in (("u'", ""), ("['", ""), ("[", ""), ("']", ""), ("\\n", ""), ("\\t", "")): # title = title.replace(*r)