Skip to content

Commit

Permalink
Merge pull request #4845 from NewAgeAirbender/updates
Browse files Browse the repository at this point in the history
Multi Committee scraper & NH action classification updates
  • Loading branch information
NewAgeAirbender authored Feb 16, 2024
2 parents 6322b85 + a4f9769 commit 99b9847
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scrapers/nh/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# These are regex patterns that map to action categories.
_categorizer_rules = (
Rule(r"Minority Committee Report", None), # avoid calling these passage
Rule(r"Ought to Pass", ["passage"]),
Rule(r"^Ought to Pass", ["passage"]),
Rule(r"Passed by Third Reading", ["reading-3", "passage"]),
Rule(r".*Ought to Pass", ["committee-passage-favorable"]),
Rule(r".*Introduced(.*) and (R|r)eferred", ["introduction", "referral-committee"]),
Expand Down
19 changes: 17 additions & 2 deletions scrapers_next/il/committees.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,24 @@ class SenateList(HtmlListPage):
def process_item(self, item):
# committee codes dictionary used to map subcommittees to parent committees
comm_codes_dict = {
"APED": "Approp Ed",
"SAPP": "Appropriations",
"SCCL": "Criminal Law",
"SENE": "Energy and Public Utilities",
"SEXC": "Executive",
"SFIC": "Financial Institutions",
"SHEA": "Health",
"SINS": "Insurance",
"SGOA": "State Government",
"SJUD": "Judiciary",
"SLAB": "Labor",
"SLIC": "Licensed Activities",
"SRED": "Redistricting",
"SREV": "Revenue",
"SSCC": "Criminal Law & Public Safety",
"SSCP": "Pensions",
"STRN": "Transportation",
"SVET": "Veterans Affairs",
}

if item.getchildren():
Expand Down Expand Up @@ -114,13 +120,21 @@ class HouseList(HtmlListPage):
def process_item(self, item):
# committee codes dictionary used to map subcommittees to parent committees
comm_codes_dict = {
"HACW": "Adoption & Child Welfare",
"HAGC": "Agriculture & Conservation",
"HAPI": "Appropriations- Higher Education",
"HAPH": "Appropriations- Human Services",
"HAPH": "Appropriations- Health & Human Services",
"HAPP": "Appropriations- Public Safety",
"HCIV": "Cities & Villages",
"HCON": "Consumer Protection",
"HENG": "Energy & Environment",
"HELO": "Elementary & Secondary Education",
"SHEE": "Ethics & Elections Committee",
"HFIN": "Financial Institutions",
"HHCA": "Health Care Availability & Accessibility",
"HEXC": "Executive",
"HHCL": "Health Care Licenses",
"HHED": "Higher Education",
"HHSV": "Human Services",
"HINS": "Insurance",
"HJUA": "Judiciary- Civil",
Expand All @@ -130,10 +144,11 @@ def process_item(self, item):
"HMAC": "Museums, Arts, & Cultural Enhancement",
"HPPN": "Personnel & Pensions",
"SHPF": "Police & Fire Committee",
"HPDA": "Prescription Drug Affordability",
"HPUB": "Public Utilities",
"HREF": "Revenue & Finance",
"HSGA": "State Government Administration",
"HTRR": "Transportation: Regulation, Roads",
"HTRR": "Transportation: Regulations, Roads & Bridges",
"HVES": "Transportation: Vehicles & Safety",
}

Expand Down
7 changes: 5 additions & 2 deletions scrapers_next/wy/committees.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, com_name):


class CommitteeList(JsonListPage):
year = 2023
year = 2024
source = URL(
f"https://web.wyoleg.gov/LsoService/api/committeeList/{year}/J", timeout=15
)
Expand Down Expand Up @@ -47,7 +47,10 @@ def process_page(self):
classification = "committee"
parent = None
if "subcommittee" in name.lower():
if "capitol interpretive exhibits" in name.lower():
if (
"capitol interpretive exhibits" in name.lower()
or "capitol governance" in name.lower()
):
name = name.replace("Subcommittee", "").strip()
else:
raise UnknownSubCommFound(name)
Expand Down

0 comments on commit 99b9847

Please sign in to comment.