diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2013-07-04 19:56:14 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2013-07-04 19:56:14 +0200 |
commit | 947d9143174d70b9cc10a96692c85c476ca18af1 (patch) | |
tree | d9c10fb6b146b2ece3dffe107eb34f452a2d963d /modules | |
parent | 9b5c0b141cd333f563691cbb11e4c59094103c8c (diff) |
tracking: Strip whitespace in descriptions from Posten.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tracking.py | 2 |
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('<', '<').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 |