Skip to content

Commit

Permalink
IN: Add comments, fix typo, remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
jessemortenson committed Oct 31, 2024
1 parent 83b13a1 commit 3e71fd0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scrapers/in/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def scrape(self):
)
event.dedupe_key = event_name
event.add_source(link, note="API details")
name_slug = committee_name.lower().replace(" ", "-")
name_slug = re.sub("[^a-zA-Z0-9]+", "-", committee_name.lower())

document_url = f"https://iga.in.gov/pdf-documents/{session_no}/{self.session}/{committee_chamber}/committees/{committee_type}/{name_slug}/{_id}/meeting.pdf"
Expand All @@ -96,7 +95,7 @@ def scrape(self):
)
event.add_participant(committee_name, type="committee", note="host")
event.add_document(
"Meeting Agenda", document_url, media_type="applicaiton/pdf"
"Meeting Agenda", document_url, media_type="application/pdf"
)
event.add_media_link("Video of Hearing", video_url, media_type="text/html")

Expand All @@ -119,7 +118,7 @@ def scrape(self):
# exhibit_pdf_url = self.apiclient.get_document_url(
# exhibit["pdfDownloadLink"]
# )
# Proxy URL
# Proxy URL used because URL provided by API is not directly accessible over the web
exhibit_pdf_url = urljoin(PROXY_BASE_URL, exhibit["pdfDownloadLink"])
self.logger.info(exhibit_pdf_url)
if exhibit_pdf_url:
Expand All @@ -133,7 +132,7 @@ def scrape(self):
if minute["link"]:
# Original URL
# minute_pdf_url = f"https://iga.in.gov/pdf-documents/{session_no}/{self.session}/{committee_chamber}/committees/{committee_type}/{name_slug}/{_id}/{_id}_minutes.pdf"
# Proxy URL
# Proxy URL used because URL provided by API is not directly accessible over the web
minute_pdf_url = urljoin(PROXY_BASE_URL, minute["link"])
event.add_document(
"Meeting Minutes",
Expand Down

0 comments on commit 3e71fd0

Please sign in to comment.