From af15fd01a05b2f0cdc884a62c71e601b66ce336d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 11 Jul 2009 12:33:51 +0200 Subject: [PATCH] parse default sort and imdb episodes --- oxweb/wikipedia.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/oxweb/wikipedia.py b/oxweb/wikipedia.py index 257b87a..905abed 100644 --- a/oxweb/wikipedia.py +++ b/oxweb/wikipedia.py @@ -56,12 +56,16 @@ def getMovieData(wikipediaUrl): filmbox[key] = value if 'imdb title' in data: filmbox['imdb_id'] = findRe(data, 'imdb title\|.*?(\d*?)\|') + else if 'imdb episode' in data: + filmbox['imdb_id'] = findRe(data, 'imdb episode\|.*?(\d*?)\|') if 'Amg movie' in data: filmbox['amg_id'] = findRe(data, 'Amg movie\|.*?(\d*?)\|') if 'rotten-tomatoes' in data: filmbox['rottentomatoes_id'] = findRe(data, 'rotten-tomatoes\|id\=(.*?)\|') if not filmbox['rottentomatoes_id']: filmbox['rottentomatoes_id'] = findRe(data, 'rotten-tomatoes\|(.*?)\|') + if 'DEFAULTSORT' in data: + filmbox['title_sort'] = findRe(data, '''\{\{DEFAULTSORT:(.*?)\}\}''') return filmbox def getImageUrl(name):