Skip to content

Commit 14ab1fa

Browse files
committed
move log message to show sheet we're pulling
Signed-off-by: John Seekins <[email protected]>
1 parent faabbfa commit 14ab1fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scraper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ def __init__(self):
3333
self.filename = f"{SCRIPT_DIR}{os.sep}detentionstats.xlsx"
3434

3535
def _download_sheet(self) -> None:
36-
logger.info("Finding and Downloading detention stats sheet from %s", self.base_xlsx_url)
3736
resp = session.get(self.base_xlsx_url, timeout=120)
3837
soup = BeautifulSoup(resp.content, "html.parser")
3938
links = soup.findAll("a", href=re.compile("^https://www.ice.gov/doclib.*xlsx"))
4039
# quick solution is first result
4140
self.sheet_url = links[0]["href"]
4241
if not os.path.isfile(self.filename) or os.path.getsize(self.filename) < 1:
42+
logger.info("Downloading detention stats sheet from %s", self.sheet_url)
4343
resp = session.get(self.sheet_url, timeout=120)
4444
with open(self.filename, "wb") as f:
4545
for chunk in resp.iter_content(chunk_size=1024):

0 commit comments

Comments
 (0)