From 679bc689af5a29d53f1ee102c943125d2122c6d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20S=C3=A1=20Couto?= Date: Sun, 17 Mar 2019 16:33:06 +0100 Subject: [PATCH] Iteration of 50 implemented to the value of d on exception --- selenium_instances.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selenium_instances.py b/selenium_instances.py index 39eed50..050eaa3 100644 --- a/selenium_instances.py +++ b/selenium_instances.py @@ -26,6 +26,8 @@ driver.get(url) time.sleep(3) d = 1 +e = [52,102,152,202,252,302,352,402] +f = 0 i = 0 @@ -89,7 +91,8 @@ while True: except: print("This is an exception") driver.find_element_by_css_selector('#load-more-instances > a:nth-child(1)').click() - d = 52 + d = (e[f]) + f+=1 pass text_file.close()