Update app.py
Browse files
app.py
CHANGED
@@ -15,12 +15,12 @@ def take_screenshot(url):
|
|
15 |
wd = webdriver.Chrome(options=options)
|
16 |
wd.set_window_size(1080, 720) # Adjust the window size here
|
17 |
wd.get(url)
|
18 |
-
wd.implicitly_wait(
|
19 |
resp=driver.find_element(By.TAG_NAME, "a")
|
20 |
return resp
|
21 |
#screenshot = wd.get_screenshot_as_png()
|
22 |
except WebDriverException as e:
|
23 |
-
return
|
24 |
finally:
|
25 |
if wd:
|
26 |
wd.quit()
|
|
|
15 |
wd = webdriver.Chrome(options=options)
|
16 |
wd.set_window_size(1080, 720) # Adjust the window size here
|
17 |
wd.get(url)
|
18 |
+
wd.implicitly_wait(5)
|
19 |
resp=driver.find_element(By.TAG_NAME, "a")
|
20 |
return resp
|
21 |
#screenshot = wd.get_screenshot_as_png()
|
22 |
except WebDriverException as e:
|
23 |
+
return resp
|
24 |
finally:
|
25 |
if wd:
|
26 |
wd.quit()
|