From 647f027e8a02ecc84e732f2e66967645cb5f3d79 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 31 May 2013 11:03:09 +0200 Subject: [PATCH] criterion.py: fix title and synopsis detection --- ox/web/criterion.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ox/web/criterion.py b/ox/web/criterion.py index d72f7dc..9adf52e 100644 --- a/ox/web/criterion.py +++ b/ox/web/criterion.py @@ -35,14 +35,14 @@ def get_data(id, timeout=ox.cache.cache_timeout, get_imdb=False): html = ox.cache.read_url(data["url"], timeout=timeout) data["number"] = find_re(html, "
  • Spine #(\d+)") - data["title"] = find_re(html, "(.*?)") data["title"] = data["title"].split(u' \u2014 The Television Version')[0] data["director"] = strip_tags(find_re(html, "

    (.*?)

    ")) results = find_re(html, '
    (.*?)
    ') results = re.compile("
  • (.*?)
  • ").findall(results) data["country"] = results[0] data["year"] = results[1] - data["synopsis"] = strip_tags(find_re(html, "

    SYNOPSIS: (.*?)

    ")) + data["synopsis"] = strip_tags(find_re(html, "
    .*?

    (.*?)

    ")) result = find_re(html, "
    (.*?)
    ") if 'Blu-Ray' in result or 'Essential Art House DVD' in result: @@ -72,8 +72,7 @@ def get_data(id, timeout=ox.cache.cache_timeout, get_imdb=False): if timeout == ox.cache.cache_timeout: timeout = -1 if get_imdb: - data['imdbId'] = imdb.get_movie_id(data['title'], - data['director'], data['year'], timeout=timeout) + data['imdbId'] = imdb.get_movie_id(data['title'], data['director'], data['year'], timeout=timeout) return data def get_ids(page=None):