From d014fb7bcada62d18d8b05a5e5607993f956a3ae Mon Sep 17 00:00:00 2001 From: j Date: Mon, 5 Aug 2019 10:33:29 +0200 Subject: [PATCH] fix count < 50 --- oxdata/movie/imdbids.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oxdata/movie/imdbids.py b/oxdata/movie/imdbids.py index c0966a1..0cb606c 100644 --- a/oxdata/movie/imdbids.py +++ b/oxdata/movie/imdbids.py @@ -63,7 +63,7 @@ def get_film_count(year, month=None, day=None): data = read_url(url, timeout=TIMEOUT) total = re.compile('1-50 of ([\d,]+?) titles.').findall(data) if not total: - total = re.compile(' ([\d,]+) titles\n', re.DOTALL).findall(data) + total = re.compile('([\d,]+) titles.', re.DOTALL).findall(data) if total: return int(total[0].replace(',', '')) print('no movies', url)