Skip to content

Commit

Permalink
Merge branch 'main' into clean_coloctapp_content
Browse files Browse the repository at this point in the history
  • Loading branch information
flooie authored Oct 21, 2024
2 parents aa5f1bd + 9fafceb commit 58b43d3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions juriscraper/opinions/united_states/state/colo.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,23 @@ def _process_html(self) -> None:
self._request_url_get(url)
detail_json = self.request["response"].json()

# Reset variables to prevent sticking previous values
# when a value is missing
docket_number, case_name_full, date_filed = "", "", ""

# Example of parallel citation:
# https://research.coloradojudicial.gov/vid/907372624
citation, parallel_citation = "", ""
for p in detail_json["properties"]:
label = p["property"]["label"]
if label == "Docket Number":
docket_number = p["values"][0]
if label == "Parties":
elif label == "Parties":
case_name_full = p["values"][0]
if label == "Decision Date":
elif label == "Decision Date":
# Note that json['published_at'] is not the date_filed
date_filed = p["values"][0]
if label == "Citation":
elif label == "Citation":
citation = p["values"][0]
if len(p["values"]) > 1:
parallel_citation = p["values"][1]
Expand Down

0 comments on commit 58b43d3

Please sign in to comment.