warn-scraper 1.2.115__py3-none-any.whl → 1.2.117__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
warn/scrapers/co.py CHANGED
@@ -184,6 +184,7 @@ def scrape(
184
184
  "@dropdown": "dropdown",
185
185
  "Received": "received_date",
186
186
  "Notes": "notes",
187
+ "12/1/25`": "company",
187
188
  # Only add new matches above here, not below here.
188
189
  }
189
190
 
@@ -263,6 +264,13 @@ def scrape(
263
264
  for row in cleaned_data:
264
265
  row_dict = {}
265
266
  mangled = []
267
+
268
+ line = {}
269
+ for key in row:
270
+ if not key.startswith("blank_cell_"):
271
+ line[key] = row[key]
272
+ row = line
273
+
266
274
  for key in row:
267
275
  if (
268
276
  key not in header_crosswalk and key not in header_garbage
@@ -321,13 +329,19 @@ def scrape_google_sheets(table, header_list=None):
321
329
  # Parse the header row into a list,
322
330
  # preserving its order in the sheet
323
331
  header_list = []
332
+ blanks = 0
324
333
  for cellindex, cell in enumerate(header_soup.find_all("td")):
325
334
  cell_text = cell.text.strip()
326
- # Skip empty headers
335
+ # Handle empty header cells
327
336
  if cell_text:
328
337
  header_list.append(cell_text)
329
- if not cell_text and cellindex == 0:
338
+ elif not cell_text and cellindex == 0:
330
339
  header_list.append("Company Name")
340
+ elif not cell_text and cellindex > 0:
341
+ blanks += 1
342
+ cell_text = f"blank_cell_{blanks}"
343
+ logger.debug(f"Adding {cell_text}")
344
+ header_list.append(cell_text)
331
345
 
332
346
  # Loop through all the data rows, which start
333
347
  # after the header and the little bar
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warn-scraper
3
- Version: 1.2.115
3
+ Version: 1.2.117
4
4
  Summary: Command-line interface for downloading WARN Act notices of qualified plant closings and mass layoffs from state government websites
5
5
  Home-page: https://github.com/biglocalnews/warn-scraper
6
6
  Author: Big Local News
@@ -29,7 +29,7 @@ warn/scrapers/ak.py,sha256=h7BYMTV0whwWAPhbzVDVKMMoVCFphKly70aiTHabPq4,1847
29
29
  warn/scrapers/al.py,sha256=D0rT9GQ0vwfkRuveVAt-Po-T6b2TI1EPGeLOBy2m3_M,2240
30
30
  warn/scrapers/az.py,sha256=elGbue01Gjf_DQ66Wy9qqGIOJsiY-KIKJOVeft8pCXg,1447
31
31
  warn/scrapers/ca.py,sha256=VQOfjHXPCc-jYwh-EPGVVfnzvXB7pdmCt2uJ6QnMPRM,8600
32
- warn/scrapers/co.py,sha256=YZP7BHluM6tmwdQ45ZpYzLvq1S7jHGBH-4ZXlSKDP5M,17509
32
+ warn/scrapers/co.py,sha256=8Y0KJwTqX1c8AB1V9fksAT0VI-39_rINU2c_Z7w66pY,17945
33
33
  warn/scrapers/ct.py,sha256=PKeZtlB0-z2wCmYmGl_WYoVo2gzwKV36upZcJVaJxjM,4852
34
34
  warn/scrapers/dc.py,sha256=p1_c7O2R3O-41DmvcLVUIRhQKUewvZZKkzWkBxytN5M,5165
35
35
  warn/scrapers/de.py,sha256=GyM92A-lFwZAfRxgbO-sIWhRfmBEKirzchaPIv-u0o4,1364
@@ -65,9 +65,9 @@ warn/scrapers/va.py,sha256=7Nle7qL0VNPiE653XyaP9HQqSfuJFDRr2kEkjOqLvFM,11269
65
65
  warn/scrapers/vt.py,sha256=d-bo4WK2hkrk4BhCCmLpEovcoZltlvdIUB6O0uaMx5A,1186
66
66
  warn/scrapers/wa.py,sha256=UXdVtHZo_a-XfoiyOooTRfTb9W3PErSZdKca6SRORgs,4282
67
67
  warn/scrapers/wi.py,sha256=ClEzXkwZbop0W4fkQgsb5oHAPUrb4luUPGV-jOKwkcg,4855
68
- warn_scraper-1.2.115.dist-info/licenses/LICENSE,sha256=ZV-QHyqPwyMuwuj0lI05JeSjV1NyzVEk8Yeu7FPtYS0,585
69
- warn_scraper-1.2.115.dist-info/METADATA,sha256=1kh60cERBlPu4DfdWFgIFchc15NTGb3V4z4tnigCrVc,2385
70
- warn_scraper-1.2.115.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
71
- warn_scraper-1.2.115.dist-info/entry_points.txt,sha256=poh_oSweObGlBSs1_2qZmnTodlOYD0KfO7-h7W2UQIw,47
72
- warn_scraper-1.2.115.dist-info/top_level.txt,sha256=gOhHgNEkrUvajlzoKkVOo-TlQht9MoXnKOErjzqLGHo,11
73
- warn_scraper-1.2.115.dist-info/RECORD,,
68
+ warn_scraper-1.2.117.dist-info/licenses/LICENSE,sha256=ZV-QHyqPwyMuwuj0lI05JeSjV1NyzVEk8Yeu7FPtYS0,585
69
+ warn_scraper-1.2.117.dist-info/METADATA,sha256=9kVD8A4-38ukBMhwfAYKSP5AaS6HUeei6Vw6badi9DQ,2385
70
+ warn_scraper-1.2.117.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
71
+ warn_scraper-1.2.117.dist-info/entry_points.txt,sha256=poh_oSweObGlBSs1_2qZmnTodlOYD0KfO7-h7W2UQIw,47
72
+ warn_scraper-1.2.117.dist-info/top_level.txt,sha256=gOhHgNEkrUvajlzoKkVOo-TlQht9MoXnKOErjzqLGHo,11
73
+ warn_scraper-1.2.117.dist-info/RECORD,,