I'm trying to load a URL using selenium get function, sometime it does not loaded and I have to reload it again. I'm using this code,
while flag:
try:
driver.get(url)
EC.presence_of_element_located((By.TAG_NAME, "body"))
flag = False
except:
driver.get(url)
I can also get an exception inside except, How to handle this? One way is to add one more try-except inside except but I don't want to do this. I want to keep trying unless link opened.