From fe25d27b97414ca9916dfe6c2e401f8f16dea91d Mon Sep 17 00:00:00 2001 From: j Date: Mon, 5 Aug 2019 13:22:33 +0200 Subject: [PATCH] pass year, n for debugging --- oxdata/movie/imdbids.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oxdata/movie/imdbids.py b/oxdata/movie/imdbids.py index d8fe391..6537999 100644 --- a/oxdata/movie/imdbids.py +++ b/oxdata/movie/imdbids.py @@ -132,7 +132,8 @@ def parse_cast(string): results[rkey] = cast[key].split(', \n') return results -def get_films(data): + +def get_films(data, year=None, n=None): films = [] doc = lxml.html.fromstring(data) article = doc.find_class('article') @@ -229,7 +230,7 @@ def update_ids(year, month=None, day=None, sort=None, expected=None): n = '%s%s' % (base_url, has_after[0]) else: n = False - for id, film in get_films(data): + for id, film in get_films(data, year=year, n=n): if id not in films: films[id] = film debug('%s: %s of %s films - next: %s' % (key, len(films), expected, n))