warn-scraper 1.2.176.dev0__py3-none-any.whl → 1.2.177.dev0__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/dc.py +6 -1
- {warn_scraper-1.2.176.dev0.dist-info → warn_scraper-1.2.177.dev0.dist-info}/METADATA +1 -1
- {warn_scraper-1.2.176.dev0.dist-info → warn_scraper-1.2.177.dev0.dist-info}/RECORD +7 -7
- {warn_scraper-1.2.176.dev0.dist-info → warn_scraper-1.2.177.dev0.dist-info}/WHEEL +0 -0
- {warn_scraper-1.2.176.dev0.dist-info → warn_scraper-1.2.177.dev0.dist-info}/entry_points.txt +0 -0
- {warn_scraper-1.2.176.dev0.dist-info → warn_scraper-1.2.177.dev0.dist-info}/licenses/LICENSE +0 -0
- {warn_scraper-1.2.176.dev0.dist-info → warn_scraper-1.2.177.dev0.dist-info}/top_level.txt +0 -0
warn/scrapers/dc.py
CHANGED
|
@@ -45,6 +45,9 @@ def scrape(
|
|
|
45
45
|
|
|
46
46
|
if not success: # If we don't have a file for a new year
|
|
47
47
|
targetfile = cache_dir / f"dc/{current_year - 1}.html"
|
|
48
|
+
logger.warn(
|
|
49
|
+
f"Could not find a file for {current_year} -- do we have a bad URL?"
|
|
50
|
+
)
|
|
48
51
|
url = f"https://does.dc.gov/page/industry-closings-and-layoffs-warn-notifications-{current_year - 1}"
|
|
49
52
|
success, content = utils.save_if_good_url(targetfile, url)
|
|
50
53
|
|
|
@@ -62,12 +65,14 @@ def scrape(
|
|
|
62
65
|
|
|
63
66
|
# Parse the list of links
|
|
64
67
|
soup = BeautifulSoup(root_html, "html5lib")
|
|
65
|
-
table_list = soup.find_all("div", {"class": "field-items"})
|
|
68
|
+
# table_list = soup.find_all("div", {"class": "field-items"})
|
|
69
|
+
table_list = soup.find_all("div", {"class": "field-item"})
|
|
66
70
|
assert len(table_list) > 0
|
|
67
71
|
|
|
68
72
|
# Grab all the links
|
|
69
73
|
link_table = table_list[0]
|
|
70
74
|
link_lookup = {_extract_year(a.string): a["href"] for a in link_table.find_all("a")}
|
|
75
|
+
logger.debug(f"{link_lookup}")
|
|
71
76
|
|
|
72
77
|
# As documented in #238, the page for 2014 is missing. We're
|
|
73
78
|
# testing whether the URL for the 2019 page is the same as the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: warn-scraper
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.177.dev0
|
|
4
4
|
Summary: Command-line interface for downloading WARN Act notices of qualified plant closings and mass layoffs from state government websites
|
|
5
5
|
Author-email: Big Local News <biglocalnews@stanford.edu>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -18,7 +18,7 @@ warn/scrapers/az.py,sha256=elGbue01Gjf_DQ66Wy9qqGIOJsiY-KIKJOVeft8pCXg,1447
|
|
|
18
18
|
warn/scrapers/ca.py,sha256=VQOfjHXPCc-jYwh-EPGVVfnzvXB7pdmCt2uJ6QnMPRM,8600
|
|
19
19
|
warn/scrapers/co.py,sha256=83OdikIrWGxt22mlI-_zLSNqJg1NO5C2Xjm3FF6DPYY,18252
|
|
20
20
|
warn/scrapers/ct.py,sha256=PzRnrq91T2a5IzDWMh0GDxWVLXkN-BtHRIYbutjgQhw,2868
|
|
21
|
-
warn/scrapers/dc.py,sha256=
|
|
21
|
+
warn/scrapers/dc.py,sha256=Hq0H6vXwgeEpX1MLKBqdGDDFmebuy7fTSoYVznT-KIs,5377
|
|
22
22
|
warn/scrapers/de.py,sha256=GyM92A-lFwZAfRxgbO-sIWhRfmBEKirzchaPIv-u0o4,1364
|
|
23
23
|
warn/scrapers/fl.py,sha256=U0XoNQr8S_9IhPutemMpDKSY8IjXf1ZepR-QezGypj4,9410
|
|
24
24
|
warn/scrapers/ga.py,sha256=2kYhuK0Q6tkwp56lTuOwIH7W5zX6KpYJkqsp5ehSdgc,10700
|
|
@@ -56,9 +56,9 @@ warn/scrapers/va.py,sha256=7Nle7qL0VNPiE653XyaP9HQqSfuJFDRr2kEkjOqLvFM,11269
|
|
|
56
56
|
warn/scrapers/vt.py,sha256=d-bo4WK2hkrk4BhCCmLpEovcoZltlvdIUB6O0uaMx5A,1186
|
|
57
57
|
warn/scrapers/wa.py,sha256=UXdVtHZo_a-XfoiyOooTRfTb9W3PErSZdKca6SRORgs,4282
|
|
58
58
|
warn/scrapers/wi.py,sha256=ClEzXkwZbop0W4fkQgsb5oHAPUrb4luUPGV-jOKwkcg,4855
|
|
59
|
-
warn_scraper-1.2.
|
|
60
|
-
warn_scraper-1.2.
|
|
61
|
-
warn_scraper-1.2.
|
|
62
|
-
warn_scraper-1.2.
|
|
63
|
-
warn_scraper-1.2.
|
|
64
|
-
warn_scraper-1.2.
|
|
59
|
+
warn_scraper-1.2.177.dev0.dist-info/licenses/LICENSE,sha256=ZV-QHyqPwyMuwuj0lI05JeSjV1NyzVEk8Yeu7FPtYS0,585
|
|
60
|
+
warn_scraper-1.2.177.dev0.dist-info/METADATA,sha256=l-rKYbVcPwi-1lCK1AEeI6CyY0H6OMed2K5QO_ELFMQ,1780
|
|
61
|
+
warn_scraper-1.2.177.dev0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
62
|
+
warn_scraper-1.2.177.dev0.dist-info/entry_points.txt,sha256=poh_oSweObGlBSs1_2qZmnTodlOYD0KfO7-h7W2UQIw,47
|
|
63
|
+
warn_scraper-1.2.177.dev0.dist-info/top_level.txt,sha256=dZfms6N3kqVXufiPOo7YqOrAcUtYfNH_oyGvYUk9FB4,5
|
|
64
|
+
warn_scraper-1.2.177.dev0.dist-info/RECORD,,
|
|
File without changes
|
{warn_scraper-1.2.176.dev0.dist-info → warn_scraper-1.2.177.dev0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{warn_scraper-1.2.176.dev0.dist-info → warn_scraper-1.2.177.dev0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|