Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,11 @@ def take_screenshot(url):
|
|
15 |
wd.set_window_size(1080, 720) # Adjust the window size here
|
16 |
wd.get(url)
|
17 |
wd.implicitly_wait(10)
|
18 |
-
|
|
|
|
|
19 |
except WebDriverException as e:
|
20 |
-
return
|
21 |
finally:
|
22 |
if wd:
|
23 |
wd.quit()
|
|
|
15 |
wd.set_window_size(1080, 720) # Adjust the window size here
|
16 |
wd.get(url)
|
17 |
wd.implicitly_wait(10)
|
18 |
+
page_content = wd.page_source
|
19 |
+
|
20 |
+
return page_content
|
21 |
except WebDriverException as e:
|
22 |
+
return "error handle website"
|
23 |
finally:
|
24 |
if wd:
|
25 |
wd.quit()
|