From d3644296fd8eaf3c132003b797dc9891dc12ada1 Mon Sep 17 00:00:00 2001 From: pamfilos Date: Thu, 31 Oct 2024 14:44:41 +0100 Subject: [PATCH] articles: fix PDF reading from stream Signed-off-by: pamfilos --- scoap3/articles/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scoap3/articles/util.py b/scoap3/articles/util.py index 703e57384..538e2a8c9 100644 --- a/scoap3/articles/util.py +++ b/scoap3/articles/util.py @@ -32,6 +32,7 @@ def parse_string_to_date_object(date_string): def is_string_in_pdf(article_file, search_string): try: pdf_file = article_file.file.read() + pdf_file.seek(0) document = fitz.open(stream=pdf_file) search_string_lower = search_string.lower()