Skip to content

Commit

Permalink
adding reason for excluding balance due from hash
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolassaw committed Sep 23, 2024
1 parent b2849f1 commit 6d73f67
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ def parse(self, county, case_number, test): #remove the test value here and just

# Adds a hash to the JSON file of the underlying HTML
body = case_soup.find("body")
"""
Why balance table is dropped before hashing:
The balance table is excluded from the hashing because
balance is updated as any costs are paid off. Otherwise,
the hash would change frequently and multiple versions
of the case would be captured that we don't want.
"""
balance_table = body.find_all("table")[-1]
if "Balance Due" in balance_table.text:
balance_table.decompose()
Expand Down

0 comments on commit 6d73f67

Please sign in to comment.