uclalawcovid19behindbars / covid19_behind_bars_scrapers

Scrapers to pull in weekly COVID data for incarcerated populations
GNU General Public License v3.0
4 stars 5 forks source link

LASD scraper doesn't extract #480

Open ssciolist opened 2 years ago

ssciolist commented 2 years ago

The issue in this scraper begins in the restruct_raw function, when many warning are thrown for not finding expected text. However, the function runs and returns restructured data. extract_from_raw() doesn't return extracted data because no death data was extracted so when line 241 runs, a comparison between nil and an int doesn't work. Fix the restruct function and the scraper should work in my opinion. Stack trace excerpted below.

ERROR [2022-06-02 11:53:21] missing value where TRUE/FALSE needed

Compact call stack:
  1 lasd$extract_from_raw()
  2 generic_scraper.R#272: tryLog(self$extract_data <- self$extract_func(raw, ...))
  3 lasd.R#241: .handleSimpleError(function (c)