update wikipedia getMovieData

This commit is contained in:
j 2010-07-18 21:12:56 +02:00
parent d56d8aaaf9
commit e4005f5810

View file

@ -64,18 +64,16 @@ def getMovieData(wikipediaUrl):
value = d[1].strip() value = d[1].strip()
filmbox[key] = value filmbox[key] = value
if 'imdb title' in data: if 'imdb title' in data:
filmbox['imdb_id'] = findRe(data, 'imdb title\|.*?(\d*?)\|') filmbox['imdb_id'] = findRe(data, 'imdb title\|.*?(\d+)')
elif 'imdb episode' in data: elif 'imdb episode' in data:
filmbox['imdb_id'] = findRe(data, 'imdb episode\|.*?(\d*?)\|') filmbox['imdb_id'] = findRe(data, 'imdb episode\|.*?(\d+)')
if 'Amg movie' in data: if 'Amg movie' in data:
filmbox['amg_id'] = findRe(data, 'Amg movie\|.*?(\d*?)\|') filmbox['amg_id'] = findRe(data, 'Amg movie\|.*?(\d+)')
if 'amg_id' in filmbox and filmbox['amg_id'].startswith('1:'): if 'amg_id' in filmbox and filmbox['amg_id'].startswith('1:'):
filmbox['amg_id'] = filmbox['amg_id'][2:] filmbox['amg_id'] = filmbox['amg_id'][2:]
if 'rotten-tomatoes' in data: if 'otten-tomatoes' in data:
filmbox['rottentomatoes_id'] = findRe(data, 'rotten-tomatoes\|id\=(.*?)\|') filmbox['rottentomatoes_id'] = findRe(data, '\{\{Rotten-tomatoes\|id=(.*?)\}\}')
if not filmbox['rottentomatoes_id']:
filmbox['rottentomatoes_id'] = findRe(data, 'rotten-tomatoes\|(.*?)\|')
if 'google video' in data: if 'google video' in data:
filmbox['google_video_id'] = findRe(data, 'google video\|.*?(\d*?)\|') filmbox['google_video_id'] = findRe(data, 'google video\|.*?(\d*?)\|')
if 'DEFAULTSORT' in data: if 'DEFAULTSORT' in data: