From 1e0fc757d60fcf3c8b0a4a33c76eef2e18505f03 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 13 Jan 2012 20:49:04 +0530 Subject: [PATCH] ids --- ox/web/wikipedia.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ox/web/wikipedia.py b/ox/web/wikipedia.py index 849c5a1..0b9de17 100644 --- a/ox/web/wikipedia.py +++ b/ox/web/wikipedia.py @@ -66,12 +66,12 @@ def getMovieData(wikipediaUrl): if key[0] == '|': key = key[1:] value = d[1].strip() + if '
' in value: + value = value.split('
') filmbox[key.strip()] = value if 'Allmovie movie' in data: filmbox['amg_id'] = findRe(data, 'Allmovie movie\|.*?(\d+)') - elif 'amg_id' in filmbox and filmbox['amg_id'].startswith('1:'): - filmbox['amg_id'] = filmbox['amg_id'][2:] r = re.compile('{{IMDb title\|id=(\d{7})', re.IGNORECASE).findall(data) if r: @@ -87,11 +87,11 @@ def getMovieData(wikipediaUrl): r = re.compile('{{mojo title\|(.*?)\|', re.IGNORECASE).findall(data) if r: - filmbox['mojo_id'] = r[0] + filmbox['mojo_id'] = r[0].replace('id=', '') r = re.compile('{{rotten-tomatoes\|(.*?)\|', re.IGNORECASE).findall(data) if r: - filmbox['rottentomatoes_id'] = r[0] + filmbox['rottentomatoes_id'] = r[0].replace('id=', '') if 'google video' in data: filmbox['google_video_id'] = findRe(data, 'google video\|.*?(\d*?)\|') if 'DEFAULTSORT' in data: