Skip to content

Commit

Permalink
Merge pull request #4912 from NewAgeAirbender/me_bills
Browse files Browse the repository at this point in the history
ME: fix urls & name check
  • Loading branch information
NewAgeAirbender authored Apr 10, 2024
2 parents c8817ef + c0e7c92 commit 93a31a0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scrapers/me/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def scrape(self, session=None, start=None, end=None):
# PresentedDate,FileSize,Topic

testimony_url_base = (
"http://legislature.maine.gov/backend/"
"https://legislature.maine.gov/backend/"
"breeze/data/CommitteeTestimony?"
"$filter=(Request%2FPaperNumber%20eq%20%27{}%27)%20and"
"%20(Request%2FLegislature%20eq%20{})"
Expand All @@ -52,7 +52,7 @@ def scrape(self, session=None, start=None, end=None):
bills_by_event = {}

bills_url = (
"http://legislature.maine.gov/backend/breeze/data/"
"https://legislature.maine.gov/backend/breeze/data/"
"getCalendarEventsBills?startDate={}&endDate={}"
)
bills_url = bills_url.format(start_date, end_date)
Expand All @@ -62,9 +62,9 @@ def scrape(self, session=None, start=None, end=None):
bills_by_event.setdefault(row["EventId"], [])
bills_by_event[row["EventId"]].append(row)

# http://legislature.maine.gov/backend/breeze/data/getCalendarEventsRaw?startDate=2019-03-01T05%3A00%3A00.000Z&endDate=2019-04-01T03%3A59%3A59.999Z&OnlyPHWS=false
# https://legislature.maine.gov/backend/breeze/data/getCalendarEventsRaw?startDate=2019-03-01T05%3A00%3A00.000Z&endDate=2019-04-01T03%3A59%3A59.999Z&OnlyPHWS=false
url = (
"http://legislature.maine.gov/backend/breeze/data/"
"https://legislature.maine.gov/backend/breeze/data/"
"getCalendarEventsRaw?startDate={}&endDate={}&OnlyPHWS=true"
)
url = url.format(start_date, end_date)
Expand Down Expand Up @@ -109,14 +109,14 @@ def scrape(self, session=None, start=None, end=None):
)
event.dedupe_key = event_name

if not name.strip():
if not name:
self.warning(f"Skipping meeting with no name, ID# {row['Id']}")
continue

event.add_participant(name=name, type="committee", note="host")

event.add_source(
"http://legislature.maine.gov/committee/#Committees/{}".format(
"https://legislature.maine.gov/committee/#Committees/{}".format(
row["CommitteeCode"]
)
)
Expand Down Expand Up @@ -156,7 +156,7 @@ def scrape(self, session=None, start=None, end=None):
title = "{} {}".format(test["NamePrefix"], title)

test_url = (
"http://legislature.maine.gov/backend/app/services"
"https://legislature.maine.gov/backend/app/services"
"/getDocument.aspx?doctype=test&documentId={}".format(
test["Id"]
)
Expand Down

0 comments on commit 93a31a0

Please sign in to comment.