Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NY event organization names #5065

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scrapers/ny/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def scrape_lower_event(self, url):
# careful, the committee name in the page #committee_div
# is getting inserted via JS
# so use the one from the table, and strip the chair name
com_name = re.sub(r"\(.*\)", "", meta[0])
com_name = re.sub(r"\(.*\)", "", meta[0]).strip()
com_name = f"Assembly {com_name}"

when = self.clean_date(meta[1])
Expand All @@ -113,7 +113,10 @@ def scrape_lower_event(self, url):
if table.xpath('.//a[contains(@href, "/leg/")]'):
agenda = event.add_agenda_item("Bills under Consideration")
for bill_link in table.xpath('.//a[contains(@href, "/leg/")]'):
agenda.add_bill(bill_link.text_content().strip())
bill_text = bill_link.text_content().strip()
# Remove trailing single character if it exists
bill_text = re.sub(r"[a-zA-Z]$", "", bill_text)
agenda.add_bill(bill_text)

yield event, event_name

Expand Down
Loading