raannakasturi
commited on
Commit
•
7c0296c
1
Parent(s):
5337987
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ import json
|
|
9 |
import requests
|
10 |
from dotenv import load_dotenv
|
11 |
import os
|
|
|
12 |
import gradio as gr
|
13 |
import subprocess
|
14 |
|
@@ -50,7 +51,7 @@ def screenshotName(url):
|
|
50 |
url = url[:-1]
|
51 |
else:
|
52 |
url = url
|
53 |
-
ssname = f"
|
54 |
return ssname
|
55 |
|
56 |
def getScreenshots(driver, url):
|
@@ -61,6 +62,7 @@ def getScreenshots(driver, url):
|
|
61 |
|
62 |
def saveScreenshot(url):
|
63 |
driver = driverSetup()
|
|
|
64 |
screenshot_file = getScreenshots(driver, url)
|
65 |
driver.quit()
|
66 |
return screenshot_file
|
|
|
9 |
import requests
|
10 |
from dotenv import load_dotenv
|
11 |
import os
|
12 |
+
import time
|
13 |
import gradio as gr
|
14 |
import subprocess
|
15 |
|
|
|
51 |
url = url[:-1]
|
52 |
else:
|
53 |
url = url
|
54 |
+
ssname = f"{url.replace('/', '')}.png"
|
55 |
return ssname
|
56 |
|
57 |
def getScreenshots(driver, url):
|
|
|
62 |
|
63 |
def saveScreenshot(url):
|
64 |
driver = driverSetup()
|
65 |
+
time.sleep(15)
|
66 |
screenshot_file = getScreenshots(driver, url)
|
67 |
driver.quit()
|
68 |
return screenshot_file
|