From fb68567ba04fcf9c1e4eabd563621328bacb7331 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Fri, 6 May 2022 14:00:49 -0400 Subject: [PATCH] test --- spicebot_command_devexcuse/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spicebot_command_devexcuse/__init__.py b/spicebot_command_devexcuse/__init__.py index d236d1b..b327645 100644 --- a/spicebot_command_devexcuse/__init__.py +++ b/spicebot_command_devexcuse/__init__.py @@ -1,6 +1,6 @@ import requests -import lxml +from lxml import html from sopel import plugin @@ -19,7 +19,7 @@ def upper(bot, trigger, comrun): def fetch_string(): content_url = 'http://developerexcuses.com' response = requests.get(content_url) - tree = lxml.html.fromstring(response.text) + tree = html.fromstring(response.content) title_elem = tree.xpath('/html/body/div[1]/center/a')[0] fetched_str = str(title_elem) return fetched_str