From 0ad7a088bfc638fdb63dff6c88167a466d06124a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 6 May 2013 10:25:56 +0200 Subject: [PATCH] fix wikipedia parser --- ox/web/wikipedia.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ox/web/wikipedia.py b/ox/web/wikipedia.py index b0e93e4..0a7436f 100644 --- a/ox/web/wikipedia.py +++ b/ox/web/wikipedia.py @@ -65,7 +65,11 @@ def get_movie_data(wikipedia_url): key = key.strip() if value: if key in filmbox: - filmbox[key] += value + print key, value, filmbox + if isinstance(value, list) and isinstance(filmbox[key], basestring): + filmbox[key] = [filmbox[key]] + value + else: + filmbox[key] += value if isinstance(filmbox[key], list): filmbox[key] = [k for k in filmbox[key] if k] else: