Skip to content

Commit

Permalink
bugfix/update-tests-and-members-data (#152)
Browse files Browse the repository at this point in the history
* Updated council members information

* Try using m/d/yy and m/d/yyyy

* Fixed test_scraper_utils.py

* Fixed test_scrapers.py

* Lint
  • Loading branch information
dphoria authored Aug 11, 2024
1 parent 0594d21 commit cab0cb4
Show file tree
Hide file tree
Showing 5 changed files with 312 additions and 108 deletions.
20 changes: 15 additions & 5 deletions cdp_scrapers/instances/portland.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,21 @@ def get_disposition(minute_section: Tag) -> str:
Disposition string for the event minute item
e.g. Accepted, Passed, Placed on file
"""
result_status_element_sibling = minute_section.find(
"div", text=re.compile("Disposition"), attrs={"class": "field__label"}
)
result_status_element = result_status_element_sibling.next_sibling
return result_status_element.text

def _get_disposition(keyword: str):
result_status_element_sibling = minute_section.find(
"div", text=re.compile(keyword), attrs={"class": "field__label"}
)
result_status_element = (
result_status_element_sibling.next_sibling
if result_status_element_sibling is not None
else None
)
return result_status_element.text if result_status_element is not None else None

disposition = _get_disposition("Disposition")
disposition = disposition or _get_disposition("Council action")
return disposition or ""


def disposition_to_minute_decision(
Expand Down
Loading

0 comments on commit cab0cb4

Please sign in to comment.