warn-scraper 1.2.98__py3-none-any.whl → 1.2.99__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/va.py CHANGED
@@ -49,7 +49,8 @@ def scrape(
49
49
  Returns: the Path where the file is written
50
50
  """
51
51
  cache = Cache(cache_dir)
52
- csv_url = "https://vec.virginia.gov/warn-notices-csv.csv"
52
+ # csv_url = "https://vec.virginia.gov/warn-notices-csv.csv"
53
+ csv_url = "https://vec.virginia.gov/warn_notices.csv"
53
54
 
54
55
  """
55
56
  This scraper originally tried to parse HTML to find a CSV download link.
@@ -145,7 +146,10 @@ def scrape(
145
146
  driver = webdriver.Chrome(options=chromeoptionsholder, service=service)
146
147
  logger.debug(f"Attempting to fetch {csv_url}")
147
148
  driver.get(csv_url)
148
- sleep(30) # Give it plenty of time to evaluate Javascript
149
+ sleep(45) # Give it plenty of time to evaluate Javascript
150
+ driver.get(csv_url)
151
+ sleep(10)
152
+ driver.quit()
149
153
 
150
154
  download_dir = os.path.expanduser("~") + "/Downloads"
151
155
 
@@ -153,7 +157,7 @@ def scrape(
153
157
  logger.error(f"The download directory is not {download_dir}.")
154
158
 
155
159
  # get the list of files
156
- list_of_files = glob(download_dir + "/warn-notices-csv*.csv")
160
+ list_of_files = glob(download_dir + "/warn_notices*.csv")
157
161
  if len(list_of_files) == 0:
158
162
  logger.error(f"No matching files found in {download_dir}.")
159
163
 
@@ -172,8 +176,6 @@ def scrape(
172
176
 
173
177
  copyfile(latest_file, target_filename)
174
178
 
175
- driver.quit()
176
-
177
179
  # Download it to the cache
178
180
  # cache.download("va/source.csv", csv_url, verify=True)
179
181
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: warn-scraper
3
- Version: 1.2.98
3
+ Version: 1.2.99
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
@@ -61,13 +61,13 @@ warn/scrapers/sd.py,sha256=_4R19Ybzsyx1PvcWV3_laJmJ3etrwVGfhNEQm6njwoA,1904
61
61
  warn/scrapers/tn.py,sha256=i1H7c09Ea3CDrTXqqRMLBMPT_34QtGA0-x7T8rm_j5Q,2945
62
62
  warn/scrapers/tx.py,sha256=watfR1gyN9w7nluiAOnnIghEmoq3eShNUzYSZ8SkZy4,4438
63
63
  warn/scrapers/ut.py,sha256=iUh38YIjbvv5MyyKacsiZNe8KjfdBeDaOf-qMQEF_kc,2245
64
- warn/scrapers/va.py,sha256=SBL0lHEvL9DxjvMS6Rim-o9Ow1j4QHR7CWB7eMbbeec,8284
64
+ warn/scrapers/va.py,sha256=AXcj3VpNfprhwVqVyc7hYzLamWtsf1_yOvpXSitpZeM,8389
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.98.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
- warn_scraper-1.2.98.dist-info/METADATA,sha256=tMwNHjkc4F4yEa1eYr_kwSYbGsKDRhyD_tOpjv6ciMI,2145
70
- warn_scraper-1.2.98.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
71
- warn_scraper-1.2.98.dist-info/entry_points.txt,sha256=poh_oSweObGlBSs1_2qZmnTodlOYD0KfO7-h7W2UQIw,47
72
- warn_scraper-1.2.98.dist-info/top_level.txt,sha256=gOhHgNEkrUvajlzoKkVOo-TlQht9MoXnKOErjzqLGHo,11
73
- warn_scraper-1.2.98.dist-info/RECORD,,
68
+ warn_scraper-1.2.99.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
+ warn_scraper-1.2.99.dist-info/METADATA,sha256=UQ6xOoUHiV0l3bZONrApFK92uoWhZnoVbSvTb4QXVlg,2145
70
+ warn_scraper-1.2.99.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
71
+ warn_scraper-1.2.99.dist-info/entry_points.txt,sha256=poh_oSweObGlBSs1_2qZmnTodlOYD0KfO7-h7W2UQIw,47
72
+ warn_scraper-1.2.99.dist-info/top_level.txt,sha256=gOhHgNEkrUvajlzoKkVOo-TlQht9MoXnKOErjzqLGHo,11
73
+ warn_scraper-1.2.99.dist-info/RECORD,,