pass year, n for debugging

This commit is contained in:
j 2019-08-05 13:22:33 +02:00
parent 785550c753
commit fe25d27b97
1 changed files with 3 additions and 2 deletions

View File

@ -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))