diff options
Diffstat (limited to 'python/parse_citi_pdf.py')
| -rw-r--r-- | python/parse_citi_pdf.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/parse_citi_pdf.py b/python/parse_citi_pdf.py index ccbcd56b..c4cfa007 100644 --- a/python/parse_citi_pdf.py +++ b/python/parse_citi_pdf.py @@ -1,7 +1,7 @@ import pandas as pd import subprocess from bs4 import BeautifulSoup -from pathlib import Path +from env import DAILY_DIR def load_pdf(file_path): proc = subprocess.run(["pdftohtml", "-xml", "-stdout", "-i", @@ -35,9 +35,9 @@ def get_df(l, col1, col2, col3): def get_citi_collateral(d): try: fname = next((DAILY_DIR / "CITI_reports"). - glob("262966_MarginNotice_*_.pdf")) + glob(f"262966_MarginNotice_{d.strftime('%Y%m%d')}_*.pdf")) except StopIteration: - raise FileNotFoundError(f"CITI file not found for date {d}") + raise FileNotFoundError(f"CITI file not found for date {d.date()}") l = load_pdf(fname) col1 = (370, 500, 70, 100) col2 = (370, 500, 100, 500) |
