General search fix, status pattern match regex, find feeds on startup

This commit is contained in:
Luciano Gervasoni
2025-04-09 15:52:35 +02:00
parent 296a8fe8a8
commit f369b23d81
22 changed files with 538 additions and 356 deletions

View File

@@ -39,7 +39,7 @@ class MissingKidsFetcher():
logger.debug("Processing page: {}...".format(i))
try:
time.sleep(int(os.getenv("SELENIUM_SLEEP_PER_PAGE", 4))) #driver.implicitly_wait(3)
time.sleep(float(os.getenv("SELENIUM_SLEEP_PER_PAGE", 4))) #driver.implicitly_wait(3)
# Fetch poster URLs
for element_type in ["a"]: # ["a", "p", "div"]:
for elem in driver.find_elements(By.TAG_NAME, element_type):
@@ -75,7 +75,7 @@ class MissingKidsFetcher():
logger.info(e.text)
# driver.refresh()
time.sleep(int(os.getenv("SELENIUM_SLEEP_PER_PAGE", 4)))
time.sleep(float(os.getenv("SELENIUM_SLEEP_PER_PAGE", 4)))
if (i == first_n_pages):
continue_iterating = False
@@ -86,6 +86,7 @@ class MissingKidsFetcher():
logger.warning("Exception while fetching MissingKids {}".format(str(e)), exc_info=True)
set_urls = set()
# Release memory
try:
driver.close()
except Exception as e: