patch for a connection refusing error (issue #177) where google will refuse your connection because you're sending to many requests to it, will sleep and try again

This commit is contained in:
ekultek 2017-11-28 10:18:07 -06:00
parent de767965e5
commit f1e3c53cb0

View file

@ -370,7 +370,7 @@ def parse_search_results(query, url_to_search, verbose=False, **kwargs):
req = requests.get(query_url, proxies=proxy_string, params=headers)
except ConnectionError:
logger.warning(set_color(
"target machine refused connection, delaying and trying again..."
"target machine refused connection, delaying and trying again...", level=30
))
time.sleep(3)
req = requests.get(query_url, proxies=proxy_string, params=headers)