fix wikipedia movie parser
This commit is contained in:
parent
5c1ab13749
commit
2abe99c89f
1 changed files with 14 additions and 14 deletions
|
@ -58,11 +58,11 @@ def get_movie_data(wikipedia_url):
|
||||||
key = _key
|
key = _key
|
||||||
if key[0] == '|':
|
if key[0] == '|':
|
||||||
key = key[1:]
|
key = key[1:]
|
||||||
|
key = key.strip()
|
||||||
value = d[1].strip()
|
value = d[1].strip()
|
||||||
value = value.replace('<!-- see WP:ALT -->', '')
|
value = value.replace('<!-- see WP:ALT -->', '')
|
||||||
if '<br>' in value:
|
if '<br>' in value:
|
||||||
value = value.split('<br>')
|
value = value.split('<br>')
|
||||||
key = key.strip()
|
|
||||||
if value:
|
if value:
|
||||||
if key in filmbox:
|
if key in filmbox:
|
||||||
if isinstance(value, list) and isinstance(filmbox[key], basestring):
|
if isinstance(value, list) and isinstance(filmbox[key], basestring):
|
||||||
|
|
Loading…
Add table
Reference in a new issue