Skip to content

Commit

Permalink
Merge pull request #4961 from NewAgeAirbender/master
Browse files Browse the repository at this point in the history
IL: temp remove committee parsing & votes
  • Loading branch information
NewAgeAirbender authored Jun 12, 2024
2 parents fc364ad + 2a42be9 commit eeb73d9
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions scrapers/il/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import lxml.html
from openstates.scrape import Scraper, Bill, VoteEvent
from openstates.utils import convert_pdf
from ._utils import canonicalize_url

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

Expand Down Expand Up @@ -503,7 +502,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,18 +518,19 @@ 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):
try:
((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
except ValueError:
self.warning("Can't resolve voting body for %s" % classification)
# TODO: add as related_entity not actor
# if related_orgs and any(c.startswith("committee") for c in classification):
# try:
# ((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
# except ValueError:
# self.warning("Can't resolve voting body for %s" % classification)

bill.add_action(
action,
Expand Down Expand Up @@ -562,8 +562,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 eeb73d9

Please sign in to comment.