This commit is contained in:
deathbybandaid 2019-10-04 09:40:35 -04:00
parent f23df8a747
commit aaf74c418c

View File

@ -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)