Wait for table
This commit is contained in:
parent
3b239f9cef
commit
10360ff57c
|
@ -95,6 +95,7 @@ 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"
|
||||
)
|
||||
wait(EC.visibility_of_element_located((By.ID, "gdvInstWithEQ")))
|
||||
print(
|
||||
f'Page title: {driver.find_element(By.TAG_NAME, "title").text.strip()}',
|
||||
file=sys.stderr,
|
||||
|
@ -104,7 +105,7 @@ def scrape_page(page_num):
|
|||
except Exception as e:
|
||||
driver.quit()
|
||||
print(
|
||||
f"Attempt {i} failed due to {type(e).__name__}: {e}, retrying in 25 seconds...",
|
||||
f"Attempt {i} failed due to {type(e).__name__}, retrying in 25 seconds...",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sleep(25)
|
||||
|
@ -129,7 +130,7 @@ def scrape_institution_safe(index, page_num):
|
|||
except Exception as e:
|
||||
driver.quit()
|
||||
print(
|
||||
f"\tAttempt {i} failed due to {type(e).__name__}: {e}, retrying in 25 seconds...",
|
||||
f"\tAttempt {i} failed due to {type(e).__name__}, retrying in 25 seconds...",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sleep(25)
|
||||
|
@ -148,6 +149,7 @@ def scrape_institution(index, page_num):
|
|||
driver.get(
|
||||
"https://tes.collegesource.com/publicview/TES_publicview01.aspx?rid=f080a477-bff8-46df-a5b2-25e9affdd4ed&aid=27b576bb-cd07-4e57-84d0-37475fde70ce"
|
||||
)
|
||||
wait(EC.visibility_of_element_located((By.ID, "gdvCourseEQ")))
|
||||
jump_to_page(1, page_num, "gdvInstWithEQ", "lblInstWithEQPaginationInfo")
|
||||
|
||||
inst_link = driver.find_element(
|
||||
|
|
Loading…
Reference in New Issue