warn-scraper 1.2.80__py3-none-any.whl → 1.2.81__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/ri.py +9 -3
- {warn_scraper-1.2.80.dist-info → warn_scraper-1.2.81.dist-info}/METADATA +1 -1
- {warn_scraper-1.2.80.dist-info → warn_scraper-1.2.81.dist-info}/RECORD +7 -7
- {warn_scraper-1.2.80.dist-info → warn_scraper-1.2.81.dist-info}/LICENSE +0 -0
- {warn_scraper-1.2.80.dist-info → warn_scraper-1.2.81.dist-info}/WHEEL +0 -0
- {warn_scraper-1.2.80.dist-info → warn_scraper-1.2.81.dist-info}/entry_points.txt +0 -0
- {warn_scraper-1.2.80.dist-info → warn_scraper-1.2.81.dist-info}/top_level.txt +0 -0
warn/scrapers/ri.py
CHANGED
@@ -61,6 +61,7 @@ def scrape(
|
|
61
61
|
dirty_list.extend(localrows)
|
62
62
|
|
63
63
|
headers = dirty_list[1] # Skip false header at position 0
|
64
|
+
headers = [x for x in headers if x is not None]
|
64
65
|
headers[2] = (
|
65
66
|
headers[2]
|
66
67
|
.replace("Company Name ", "Company Name")
|
@@ -85,9 +86,14 @@ def scrape(
|
|
85
86
|
logger.debug(f"Got : {row}")
|
86
87
|
else:
|
87
88
|
line = {}
|
88
|
-
|
89
|
-
|
90
|
-
|
89
|
+
if len(headers) > len(row):
|
90
|
+
logger.debug(
|
91
|
+
f"{len(row)} items found, vs. expected {len(headers)}. Dropping row: {row}"
|
92
|
+
)
|
93
|
+
else:
|
94
|
+
for i, fieldname in enumerate(headers):
|
95
|
+
line[fieldname] = row[i]
|
96
|
+
row_list.append(line)
|
91
97
|
# dirty_list = None
|
92
98
|
logger.debug(
|
93
99
|
f"Successfully merged {len(row_list)-1:,} records from new spreadsheet."
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: warn-scraper
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.81
|
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
|
@@ -55,7 +55,7 @@ warn/scrapers/ny.py,sha256=kuBdgF1C_GnHEWlaLAas6zJG2Xhfj3c4q_-tuJLX2rk,3615
|
|
55
55
|
warn/scrapers/oh.py,sha256=2MEB_0AT37dsAsrhdl_Y0LUNHu0xGy4B1F7aSMhuUu0,3151
|
56
56
|
warn/scrapers/ok.py,sha256=qJE49VY6dMhbokFB9IAOL2XyuYSJpEKKxITPO9sUHS4,1197
|
57
57
|
warn/scrapers/or.py,sha256=0PjyrW3CHdxtHhqEo3Ob-9B6YckACoBD3K0c4FPQUcg,5208
|
58
|
-
warn/scrapers/ri.py,sha256=
|
58
|
+
warn/scrapers/ri.py,sha256=EUyLy59eNiYHqiJR8C0YcJrZtp09KyVc45AFD0_Uc0U,4497
|
59
59
|
warn/scrapers/sc.py,sha256=p3kscSNSW9C8C5QaSUbCAo6XibgB7G2iH6zaMH7Mnsc,4819
|
60
60
|
warn/scrapers/sd.py,sha256=_4R19Ybzsyx1PvcWV3_laJmJ3etrwVGfhNEQm6njwoA,1904
|
61
61
|
warn/scrapers/tn.py,sha256=i1H7c09Ea3CDrTXqqRMLBMPT_34QtGA0-x7T8rm_j5Q,2945
|
@@ -65,9 +65,9 @@ warn/scrapers/va.py,sha256=13lhkQrSkPGHEiWUuf1qiS890PWYE5gV-TgISpoiQnc,1711
|
|
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.
|
69
|
-
warn_scraper-1.2.
|
70
|
-
warn_scraper-1.2.
|
71
|
-
warn_scraper-1.2.
|
72
|
-
warn_scraper-1.2.
|
73
|
-
warn_scraper-1.2.
|
68
|
+
warn_scraper-1.2.81.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
69
|
+
warn_scraper-1.2.81.dist-info/METADATA,sha256=as0b1BvFXQ2WRR6x1MH3a3KqPPNCAz1wQTP8SGTdndI,2025
|
70
|
+
warn_scraper-1.2.81.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
71
|
+
warn_scraper-1.2.81.dist-info/entry_points.txt,sha256=poh_oSweObGlBSs1_2qZmnTodlOYD0KfO7-h7W2UQIw,47
|
72
|
+
warn_scraper-1.2.81.dist-info/top_level.txt,sha256=gOhHgNEkrUvajlzoKkVOo-TlQht9MoXnKOErjzqLGHo,11
|
73
|
+
warn_scraper-1.2.81.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|