Skip to content

Commit

Permalink
Revert "IL: add votes back"
Browse files Browse the repository at this point in the history
  • Loading branch information
NewAgeAirbender authored Apr 10, 2024
1 parent eddd958 commit 5966cee
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions scrapers/il/bills.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from ._utils import canonicalize_url
import re
import os
import datetime
Expand All @@ -11,6 +10,8 @@

central = pytz.timezone("US/Central")

# from ._utils import canonicalize_url


session_details = {
"103rd": {
Expand Down Expand Up @@ -503,7 +504,7 @@ def scrape_bill(self, chamber, session, doc_type, url, bill_type=None):
sponsor_list = build_sponsor_list(doc.xpath('//a[contains(@class, "content")]'))
# don't add just yet; we can make them better using action data

committee_actors = {}
# committee_actors = {}

# actions
action_tds = doc.xpath('//a[@name="actions"]/following-sibling::table[1]/td')
Expand All @@ -519,15 +520,15 @@ def scrape_bill(self, chamber, session, doc_type, url, bill_type=None):
action = action_elem.text_content()
classification, related_orgs = _categorize_action(action)

if related_orgs and any(c.startswith("committee") for c in classification):
((name, source),) = [
(a.text, a.get("href"))
for a in action_elem.xpath("a")
if "committee" in a.get("href")
]
source = canonicalize_url(source)
actor_id = {"sources__url": source, "classification": "committee"}
committee_actors[source] = name
# if related_orgs and any(c.startswith("committee") for c in classification):
# ((name, source),) = [
# (a.text, a.get("href"))
# for a in action_elem.xpath("a")
# if "committee" in a.get("href")
# ]
# source = canonicalize_url(source)
# actor_id = {"sources__url": source, "classification": "committee"}
# committee_actors[source] = name

bill.add_action(
action,
Expand Down Expand Up @@ -559,8 +560,8 @@ def scrape_bill(self, chamber, session, doc_type, url, bill_type=None):
yield bill

# temporarily remove vote processing due to pdf issues
votes_url = doc.xpath('//a[text()="Votes"]/@href')[0]
yield from self.scrape_votes(session, bill, votes_url, committee_actors)
# votes_url = doc.xpath('//a[text()="Votes"]/@href')[0]
# yield from self.scrape_votes(session, bill, votes_url, committee_actors)

def scrape_documents(self, bill, version_url):
html = self.get(version_url).text
Expand Down

0 comments on commit 5966cee

Please sign in to comment.