Skip to content

Commit

Permalink
add some filters to vector search
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Skibinski committed Oct 31, 2024
1 parent a64a46d commit a609a7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/eli_app/db_update/update_acts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ class ActUpdaterTask(DbUpdaterTask):
DATE_FIELD_NAME = "announcementDate"
STARTING_YEAR = 2022
TEMP_PDF_PATH = Path("temp.pdf")

def download_and_parse_pdf(self, eli: str, max_pages=40) -> Optional[str]:
EMBEDE_STATUSES = ["obowiązujący"]
EMBEDE_PUBLISHERS = "DU"
SUBSTRING = "sprawie ogłoszenia jednolitego tekstu"
def download_and_parse_pdf(self, eli: str, max_pages=70) -> Optional[str]:
url = f"https://api.sejm.gov.pl/eli/acts/{eli}/text.pdf"
logger.info(f"Downloading PDF from: {url}")

Expand Down

0 comments on commit a609a7b

Please sign in to comment.