fix count < 50

This commit is contained in:
j 2019-08-05 10:33:29 +02:00
parent ef8bc68f79
commit d014fb7bca
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ def get_film_count(year, month=None, day=None):
data = read_url(url, timeout=TIMEOUT)
total = re.compile('<span>1-50 of ([\d,]+?) titles.</span>').findall(data)
if not total:
total = re.compile(' ([\d,]+) titles\n', re.DOTALL).findall(data)
total = re.compile('<span>([\d,]+) titles.</span>', re.DOTALL).findall(data)
if total:
return int(total[0].replace(',', ''))
print('no movies', url)