Skip to content

Commit

Permalink
Merge pull request #5065 from alexobaseki/multi-scraper-updates
Browse files Browse the repository at this point in the history
Update NY event organization names
  • Loading branch information
alexobaseki authored Oct 25, 2024
2 parents 7d13e50 + 4231d0c commit 5954aeb
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit 5954aeb

Please sign in to comment.