From 273ca0585828ee44667690ae4d3ef86545f73183 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Tue, 10 Sep 2013 19:30:40 +1200 Subject: [PATCH] Strip HTML from online status. @Red_M --- plugins/steam_calc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/steam_calc.py b/plugins/steam_calc.py index 60d7675..d9ff67d 100644 --- a/plugins/steam_calc.py +++ b/plugins/steam_calc.py @@ -1,4 +1,4 @@ -from util import hook, http +from util import hook, http, text import csv import StringIO @@ -63,7 +63,8 @@ def steamcalc(inp, reply=None): except AttributeError: return "Could not get data for this user." - data["state"] = online_state.replace("
", ": ") # will make this pretty later + online_state = online_state.replace("
", ": ") # will make this pretty later + data["state"] = text.strip_html(online_state) # work out the average metascore for all games ms = [float(game["metascore"]) for game in games if is_number(game["metascore"])]