Add more debug printing

This commit is contained in:
powe97 2024-03-06 12:41:08 -06:00
parent aec272e28e
commit de89a56808
No known key found for this signature in database
GPG Key ID: 7D1663B10978D1BA
1 changed files with 5 additions and 1 deletions

View File

@ -95,12 +95,16 @@ def scrape_page(page_num):
driver.get(
"https://tes.collegesource.com/publicview/TES_publicview01.aspx?rid=f080a477-bff8-46df-a5b2-25e9affdd4ed&aid=27b576bb-cd07-4e57-84d0-37475fde70ce"
)
print(
f'Page title: {driver.find_element(By.TAG_NAME, "title").text.strip()}',
file=sys.stderr,
)
jump_to_page(1, page_num, "gdvInstWithEQ", "lblInstWithEQPaginationInfo")
break
except Exception as e:
driver.quit()
print(
f"Attempt {i} failed to load page, retrying in 25 seconds...",
f"Attempt {i} failed due to {type(e).__name__}: {e}, retrying in 25 seconds...",
file=sys.stderr,
)
sleep(25)