fix wikipedia parser

This commit is contained in:
j 2013-05-06 10:25:56 +02:00
parent 037b67471b
commit 0ad7a088bf

View file

@ -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: