Do not use deprecated PyPDF2 things
This commit is contained in:
@ -145,11 +145,11 @@ def download_ov_land(bundesland: str) -> List[OvRow]:
|
||||
for chunk in r.iter_content(chunk_size=8192):
|
||||
f.write(chunk)
|
||||
|
||||
pdf = PyPDF2.PdfFileReader(f)
|
||||
pdf = PyPDF2.PdfReader(f)
|
||||
valid = False
|
||||
for page in pdf.pages:
|
||||
page_num = pdf.getPageNumber(page)
|
||||
text = page.extractText()
|
||||
page_num = pdf.get_page_number(page)
|
||||
text = page.extract_text()
|
||||
|
||||
if len(text) < 100:
|
||||
if text.strip().replace(' ', '') == 'Ortsverzeichnis':
|
||||
|
Reference in New Issue
Block a user