From 31892ec9504dc7b46c644df796383387fab459c0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 25 Jul 2008 18:05:48 +0200 Subject: [PATCH] amg without 1: --- oxweb/wikipedia.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oxweb/wikipedia.py b/oxweb/wikipedia.py index 638ebf1..a08abfe 100644 --- a/oxweb/wikipedia.py +++ b/oxweb/wikipedia.py @@ -29,7 +29,7 @@ def getUrlByImdb(imdbId): return getUrlByImdbId(imdbId) def getUrlByAllmovieId(allmovieId): - query = '"amg_id = %s"'% allmovieId + query = '"amg_id = 1:%s"'% allmovieId result = find(query) if result: url = result[0][1] @@ -53,6 +53,8 @@ def getMovieData(wikipediaUrl): key = d[0].strip() value = d[1].strip() filmbox[key] = value + if 'amgId' in filmbox: + filmbox['amgId'] = filmbox['amgId'].split('1:')[-1] return filmbox def getImageUrl(name):