warn-scraper 1.2.74__py3-none-any.whl → 1.2.75__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/id.py CHANGED
@@ -12,7 +12,7 @@ __authors__ = ["chriszs", "stucka"]
12
12
  __tags__ = ["pdf"]
13
13
  __source__ = {
14
14
  "name": "Idaho Department of Labor",
15
- "url": "https://www.labor.idaho.gov/dnn/Businesses/Layoff-Assistance#2",
15
+ "url": "https://www.labor.idaho.gov/warnnotice/",
16
16
  }
17
17
 
18
18
  logger = logging.getLogger(__name__)
@@ -32,7 +32,7 @@ def scrape(
32
32
  Returns: the Path where the file is written
33
33
  """
34
34
  # Create the URL of the source PDF
35
- base_url = "https://www.labor.idaho.gov/dnn/Portals/0/Publications/"
35
+ base_url = "https://www.labor.idaho.gov/warnnotice/"
36
36
  file_name = "WARNNotice.pdf"
37
37
  # There's a numeric parameter called v on this PDF URL that updates
38
38
  # from time to time. Suspect this is a cache-buster. We're using a
@@ -40,10 +40,8 @@ def scrape(
40
40
  min_cache_buster = 0
41
41
  max_cache_buster = 10000000000
42
42
  cache_buster = random.randrange(min_cache_buster, max_cache_buster)
43
- url = f"{base_url}{file_name}?v={cache_buster}"
43
+ url = f"{base_url}?v={cache_buster}"
44
44
 
45
- # Download the PDF with verify=False because
46
- # there's a persistent cert error we're working around.
47
45
  cache = Cache(cache_dir)
48
46
  state_code = "id"
49
47
  cache_key = f"{state_code}/{file_name}"
@@ -126,9 +124,9 @@ def filter_garbage_rows(incoming: list):
126
124
  badrows += 1
127
125
  if badrows == 0:
128
126
  logger.debug("No bad rows found.")
129
- logger.debug(
130
- f"!!!!! {badrows:,} bad rows dropped from the data set with insufficient number of fields."
131
- )
127
+ logger.debug(
128
+ f"!!!!! {badrows:,} bad rows dropped from the data set with insufficient number of fields."
129
+ )
132
130
  return outgoing
133
131
 
134
132
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: warn-scraper
3
- Version: 1.2.74
3
+ Version: 1.2.75
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
@@ -37,7 +37,7 @@ warn/scrapers/fl.py,sha256=YJ6Qt-jJZ7_iUKlHDaQuaV2gRmae8AJKS5dwwChadBE,9563
37
37
  warn/scrapers/ga.py,sha256=iuvXoP5nPEnjm8wiEWhtBwLnkdmElhJILin3No5HIyo,7412
38
38
  warn/scrapers/hi.py,sha256=pSplAP15_ZBfQtcywyErmvNcrk7u55TjZj_F0Nqw9L8,5660
39
39
  warn/scrapers/ia.py,sha256=zOncaA9M0d6paT4pB7UU_4D_yxUgeUiGRcnpKi9DsRA,1999
40
- warn/scrapers/id.py,sha256=rRkE9g9ZOL7JgTdIz46kyGOeetzSla3e1Xr6gJ1v_74,5443
40
+ warn/scrapers/id.py,sha256=Snqk-FXUq6_ovlpj-t9YKIOJEPF_ixJb3kfZRPJ02yU,5296
41
41
  warn/scrapers/il.py,sha256=sygdvsNuB_Gvu3o_HidtpSP4FLz0szKb1zEHqGxVtlI,1563
42
42
  warn/scrapers/in.py,sha256=dAT40ROhhKiwLcwa_YJ6EyhsYBLe0IX2rOWXmNa6JMs,2026
43
43
  warn/scrapers/ks.py,sha256=F_3biEMF7zgCX2XVuUACR74Vyzapta4SaM9SY3EuZCU,1266
@@ -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.74.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
- warn_scraper-1.2.74.dist-info/METADATA,sha256=qUTAC44XVu9ARQFObvm3h9aJe0dAduopZX4-bP18i3k,2025
70
- warn_scraper-1.2.74.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
71
- warn_scraper-1.2.74.dist-info/entry_points.txt,sha256=poh_oSweObGlBSs1_2qZmnTodlOYD0KfO7-h7W2UQIw,47
72
- warn_scraper-1.2.74.dist-info/top_level.txt,sha256=gOhHgNEkrUvajlzoKkVOo-TlQht9MoXnKOErjzqLGHo,11
73
- warn_scraper-1.2.74.dist-info/RECORD,,
68
+ warn_scraper-1.2.75.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
+ warn_scraper-1.2.75.dist-info/METADATA,sha256=qh4oJpc2dj53TxBiItdDRgzlWmOX5ilDx2XgOUG4KmM,2025
70
+ warn_scraper-1.2.75.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
71
+ warn_scraper-1.2.75.dist-info/entry_points.txt,sha256=poh_oSweObGlBSs1_2qZmnTodlOYD0KfO7-h7W2UQIw,47
72
+ warn_scraper-1.2.75.dist-info/top_level.txt,sha256=gOhHgNEkrUvajlzoKkVOo-TlQht9MoXnKOErjzqLGHo,11
73
+ warn_scraper-1.2.75.dist-info/RECORD,,