From 2a6a8df0bc0e2bf4a63fd6e7593d744850ca2d30 Mon Sep 17 00:00:00 2001 From: ekultek Date: Mon, 6 Aug 2018 15:30:03 -0500 Subject: [PATCH] possible workaround --- var/search/selenium_search.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/var/search/selenium_search.py b/var/search/selenium_search.py index bca32b7..2fcd1fa 100644 --- a/var/search/selenium_search.py +++ b/var/search/selenium_search.py @@ -414,11 +414,15 @@ def parse_search_results(query, url_to_search, verbose=False, **kwargs): "did not find any URLs with given query '{}' writing query to blacklist".format(query), level=50 )) write_to_log_file(query, BLACKLIST_FILE_PATH, BLACKLIST_FILENAME, blacklist=True) - shutdown() - logger.info(set_color( - "found a total of {} URLs with given query '{}'".format(len(true_retval), query) - )) - return list(true_retval) if len(true_retval) != 0 else None + + if len(true_retval) == 0: + logger.warning("no URLs doscivered with provided query") + return None + else: + logger.info(set_color( + "found a total of {} URLs with given query '{}'".format(len(true_retval), query) + )) + return list(true_retval) def search_multiple_pages(query, link_amount, verbose=False, **kwargs):