Selenium control loop

This commit is contained in:
Luciano Gervasoni
2025-07-08 10:19:37 +02:00
parent 9083021674
commit f729bd1cb2

View File

@@ -53,9 +53,10 @@ class MissingKidsFetcher():
results = {"status": "invalid"}
else:
# Check until finished loading
num_checks = 3
num_checks = 5
while (not load_finished(driver)) and (num_checks>=0):
time.sleep(1)
num_checks -= 1
# Find all <img> tags with src attributes. Extract src URLs
image_urls = [img.get_attribute("src") for img in driver.find_elements(By.XPATH, "//img[@src]")]