General search fix, status pattern match regex, find feeds on startup
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user