From 947d9143174d70b9cc10a96692c85c476ca18af1 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 4 Jul 2013 19:56:14 +0200 Subject: tracking: Strip whitespace in descriptions from Posten. --- modules/tracking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/tracking.py b/modules/tracking.py index dd4e396..7285014 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -148,7 +148,7 @@ class PostenModule(TrackingModule): continue last = eventset[0] desc = last.find('{%s}Description' % ns).text.replace('<', '<').replace('
', ' ') - desc = re.sub(r'<[^>]*?>', '', desc).encode('utf8') + desc = re.sub(r'<[^>]*?>', '', desc).encode('utf8').strip() isodate = last.find('{%s}OccuredAtIsoDateTime' % ns).text[:-10] isodate = datetime.datetime.strptime(isodate, '%Y-%m-%dT%H:%M:%S') city = last.find('{%s}City' % ns).text -- cgit v1.2.3