Skip to content

Commit

Permalink
MS: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jessemortenson committed Jan 23, 2025
1 parent 821b61b commit 04a9a46
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions scrapers/ms/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def process_page(self):
date = lines[i]
time = lines[i + 1]
event_title = lines[i + 2]
committee = event_title.replace('Hearing', '').strip()
committee = event_title.replace("Hearing", "").strip()
room = lines[i + 3]

date = date.split(", ", 1)[1]
Expand Down Expand Up @@ -105,9 +105,7 @@ def scrape_senate(self):
return SenateAgenda().do_scrape()

def scrape_house(self):
event_url = (
"https://billstatus.ls.state.ms.us/htms/h_sched.htm"
)
event_url = "https://billstatus.ls.state.ms.us/htms/h_sched.htm"
page = self.get(event_url).text
doc = lxml.html.fromstring(page)

Expand All @@ -133,9 +131,9 @@ def scrape_house(self):
base_date_string = main_elem.text

# Individual committee hearing will be in a div.row
if main_elem.tag == 'div' and "row" in main_elems[6].classes:
if main_elem.tag == "div" and "row" in main_elems[6].classes:
# should contain four "cells": blank, time, room number, meeting name
cols = main_elem.cssselect('div.row > div')
cols = main_elem.cssselect("div.row > div")

# Sometimes time is "AA+01" or "AA+10" etc. so not all will parse
# treat those "non-time" times as all day events
Expand All @@ -162,7 +160,7 @@ def scrape_house(self):
name=f"{event_name}{optional_time_indicator}",
start_date=date,
all_day=all_day,
location_name=location
location_name=location,
)
event.add_source(event_url)
event.add_committee(committee_name)
Expand Down

0 comments on commit 04a9a46

Please sign in to comment.