Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,9 @@ def main():
|
|
15 |
@app.get("/chrome")
|
16 |
def chrome(url:str=None,wait:int=5,header:str=None):
|
17 |
|
18 |
-
target_url =
|
19 |
wait_time = wait
|
20 |
-
header_list =
|
21 |
|
22 |
if target_url == None:
|
23 |
return {"code": 500,"msg":"No target URL"}
|
@@ -30,6 +30,7 @@ def chrome(url:str=None,wait:int=5,header:str=None):
|
|
30 |
|
31 |
driver = webdriver.Chrome(options=options)
|
32 |
|
|
|
33 |
try:
|
34 |
if header_list == None:
|
35 |
pass
|
|
|
15 |
@app.get("/chrome")
|
16 |
def chrome(url:str=None,wait:int=5,header:str=None):
|
17 |
|
18 |
+
target_url = url
|
19 |
wait_time = wait
|
20 |
+
header_list = header
|
21 |
|
22 |
if target_url == None:
|
23 |
return {"code": 500,"msg":"No target URL"}
|
|
|
30 |
|
31 |
driver = webdriver.Chrome(options=options)
|
32 |
|
33 |
+
print(header_list)
|
34 |
try:
|
35 |
if header_list == None:
|
36 |
pass
|