only return movie data if page is a movie page
This commit is contained in:
parent
b12e6f1b5c
commit
9c7b985295
1 changed files with 2 additions and 1 deletions
|
@ -69,7 +69,8 @@ def getMovieData(wikipediaUrl):
|
|||
if '<br>' in value:
|
||||
value = value.split('<br>')
|
||||
filmbox[key.strip()] = value
|
||||
|
||||
if not filmbox:
|
||||
return filmbox
|
||||
if 'amg_id' in filmbox and not filmbox['amg_id'].isdigit():
|
||||
del filmbox['amg_id']
|
||||
if 'Allmovie movie' in data:
|
||||
|
|
Loading…
Reference in a new issue