remove debug, remove 1: from amg id

This commit is contained in:
j 2009-07-14 13:34:55 +02:00
parent 8f2a2ee5bd
commit eeb9b859a2

View file

@ -39,7 +39,6 @@ def getUrlByAllmovieId(allmovieId):
def getWikiData(wikipediaUrl):
url = wikipediaUrl.replace('wikipedia.org/wiki/', 'wikipedia.org/w/index.php?title=')
url = "%s&action=raw" % url
print url
data = getUrlUnicode(url)
return data
@ -64,8 +63,8 @@ def getMovieData(wikipediaUrl):
filmbox['imdb_id'] = findRe(data, 'imdb episode\|.*?(\d*?)\|')
if 'Amg movie' in data:
filmbox['amg_id'] = findRe(data, 'Amg movie\|.*?(\d*?)\|')
if filmbox['amg_id'].startswith('1:'):
filmbox['amg_id'] = filmbox['amg_id'][2:]
if filmbox['amg_id'] and filmbox['amg_id'].startswith('1:'):
filmbox['amg_id'] = filmbox['amg_id'][2:]
if 'rotten-tomatoes' in data:
filmbox['rottentomatoes_id'] = findRe(data, 'rotten-tomatoes\|id\=(.*?)\|')