remove unnecessary array
This commit is contained in:
parent
81c0e5cf8f
commit
6202381e52
5
utils.py
5
utils.py
@ -101,11 +101,8 @@ def get_results_from_pdf(buf: BinaryIO or str, currency: str = None) -> Currency
|
|||||||
print('Parsing data... ', end='')
|
print('Parsing data... ', end='')
|
||||||
reader = PyPDF3.PdfFileReader(buf)
|
reader = PyPDF3.PdfFileReader(buf)
|
||||||
text = str()
|
text = str()
|
||||||
pages = []
|
|
||||||
for num in range(0, reader.getNumPages()-1):
|
for num in range(0, reader.getNumPages()-1):
|
||||||
pages.append(reader.getPage(num))
|
text += reader.getPage(num).extractText()
|
||||||
for page in pages:
|
|
||||||
text += page.extractText()
|
|
||||||
print('Done.')
|
print('Done.')
|
||||||
return get_results_from_text(text, currency=currency)
|
return get_results_from_text(text, currency=currency)
|
||||||
def get_fileio(date: DTDate, card_type: List[str] = CARD_VISA) -> BinaryIO: # pylint: disable=dangerous-default-value
|
def get_fileio(date: DTDate, card_type: List[str] = CARD_VISA) -> BinaryIO: # pylint: disable=dangerous-default-value
|
||||||
|
Loading…
Reference in New Issue
Block a user