Spaces:
Sleeping
Sleeping
Kajise
commited on
Commit
·
8cc29a0
1
Parent(s):
40b2567
fix: remove resolution option
Browse files
app.py
CHANGED
@@ -73,15 +73,12 @@ def run_imaginor(text: str):
|
|
73 |
is_url = re.search(regex, text)
|
74 |
|
75 |
if is_url:
|
76 |
-
|
77 |
-
options.add_argument("--window-size=1920,1080")
|
78 |
-
|
79 |
-
driver = webdriver.Chrome(options=options)
|
80 |
driver.get(text)
|
81 |
-
screenshot = driver.save_screenshot('site_screenshot.png')
|
82 |
driver.quit()
|
83 |
|
84 |
-
return ['site_screenshot.png', 'Website imagined by Imaginor, operation success.']
|
85 |
else:
|
86 |
return [None, 'Please enter a valid URL of a website/host.']
|
87 |
|
|
|
73 |
is_url = re.search(regex, text)
|
74 |
|
75 |
if is_url:
|
76 |
+
driver = webdriver.Chrome()
|
|
|
|
|
|
|
77 |
driver.get(text)
|
78 |
+
screenshot = driver.save_screenshot('./site_screenshot.png')
|
79 |
driver.quit()
|
80 |
|
81 |
+
return ['./site_screenshot.png', 'Website imagined by Imaginor, operation success.']
|
82 |
else:
|
83 |
return [None, 'Please enter a valid URL of a website/host.']
|
84 |
|