summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2013-07-04 19:56:14 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2013-07-04 19:56:14 +0200
commit947d9143174d70b9cc10a96692c85c476ca18af1 (patch)
treed9c10fb6b146b2ece3dffe107eb34f452a2d963d /modules
parent9b5c0b141cd333f563691cbb11e4c59094103c8c (diff)
tracking: Strip whitespace in descriptions from Posten.
Diffstat (limited to 'modules')
-rw-r--r--modules/tracking.py2
1 files changed, 1 insertions, 1 deletions
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('&lt;', '<').replace('<br/>', ' ')
- 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