Repository: openstates/openstates-scrapers

Issue:
WV-scrape failing since at least 2020-01-29
WV-scrape has failed 5 times since 2020-01-29

Logs:
```
    subcommands[args.subcommand].handle(args, other)
  File "/root/.cache/pypoetry/virtualenvs/**BACKUPS/PGUSER**-vRcYrsYN-py3.7/lib/python3.7/site-packages/pupa/cli/commands/update.py", line 278, in handle
    return self.do_handle(args, other, juris)
  File "/root/.cache/pypoetry/virtualenvs/**BACKUPS/PGUSER**-vRcYrsYN-py3.7/lib/python3.7/site-packages/pupa/cli/commands/update.py", line 327, in do_handle
    report['scrape'] = self.do_scrape(juris, args, scrapers)
  File "/root/.cache/pypoetry/virtualenvs/**BACKUPS/PGUSER**-vRcYrsYN-py3.7/lib/python3.7/site-packages/pupa/cli/commands/update.py", line 175, in do_scrape
    report[scraper_name] = scraper.do_scrape(**scrape_args)
  File "/root/.cache/pypoetry/virtualenvs/**BACKUPS/PGUSER**-vRcYrsYN-py3.7/lib/python3.7/site-packages/pupa/scrape/base.py", line 112, in do_scrape
    for obj in self.scrape(**kwargs) or []:
  File "/opt/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/wv/bills.py", line 61, in scrape
    yield from self.scrape_chamber(chamber, session)
  File "/opt/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/wv/bills.py", line 96, in scrape_chamber
    session, chamber, bill_id, title, link.attrib["href"]
  File "/opt/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/wv/bills.py", line 234, in scrape_bill
    yield from self.scrape_senate_vote(bill, href, date)
  File "/opt/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/wv/bills.py", line 370, in scrape_senate_vote
    yield from self.scrape_senate_vote_3col(bill, vote, text, url, date)
  File "/opt/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/**BACKUPS/PGUSER**/wv/bills.py", line 439, in scrape_senate_vote_3col
    assert yes_count == int(counts["Yea"])
AssertionError
```
        


Discussion:

Resolving patch:
diff --git a/openstates/wv/bills.py b/openstates/wv/bills.py
--- a/openstates/wv/bills.py
+++ b/openstates/wv/bills.py
@@ -86,6 +86,15 @@ def scrape_chamber(self, chamber, session):
         page = lxml.html.fromstring(self.get(url).text)
         page.make_links_absolute(url)
 
+        # Debug code to scrape an individual bill:
+        # yield from self.scrape_bill(
+        #     session,
+        #     "upper",
+        #     "SB 500",
+        #     "test",
+        #     "http://www.legis.state.wv.us/Bill_Status/Bills_history.cfm?input=500&year=2020&sessiontype=RS&btype=bill",
+        # )
+
         for link in page.xpath("//a[contains(@href, 'Bills_history')]"):
             bill_id = link.xpath("string()").strip()
             title = link.xpath("string(../../td[2])").strip()
@@ -421,6 +430,11 @@ def scrape_senate_vote_3col(self, bill, vote, text, url, date):
                 vote_val = vote_val.strip()
                 name = name.strip()
                 if vote_val == "Y":
+                    # Fix for "Class Y special hunting" in
+                    # http://www.wvlegislature.gov/legisdocs/2020/RS/votes/senate/01-27-0033.pdf
+                    if "Class Y" in line:
+                        continue
+
                     vote.yes(name)
                     yes_count += 1
                 elif vote_val == "N":


Test patch: