Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,14 @@ from selenium import webdriver
|
|
3 |
from selenium.common.exceptions import WebDriverException
|
4 |
from selenium.webdriver.common.by import By
|
5 |
|
6 |
-
|
7 |
def take_screenshots(ort, start, end, step):
|
8 |
options = webdriver.ChromeOptions()
|
9 |
options.add_argument('--headless')
|
10 |
wd = webdriver.Chrome(options=options)
|
11 |
|
12 |
results = []
|
13 |
-
|
14 |
for i in range(start, end + 1, step):
|
15 |
url = f"https://www.google.com/search?q=vereine+{ort}&start={i}"
|
16 |
wd.get(url)
|
@@ -26,7 +26,7 @@ def take_screenshots(ort, start, end, step):
|
|
26 |
wd.quit()
|
27 |
#erg ="\n".join(results)
|
28 |
#erg=results[0]
|
29 |
-
|
30 |
|
31 |
result = client.predict(
|
32 |
#query=f"erstelle ein json objekt für die vereine: \n{''.join(results)}",
|
|
|
3 |
from selenium.common.exceptions import WebDriverException
|
4 |
from selenium.webdriver.common.by import By
|
5 |
|
6 |
+
step=10
|
7 |
def take_screenshots(ort, start, end, step):
|
8 |
options = webdriver.ChromeOptions()
|
9 |
options.add_argument('--headless')
|
10 |
wd = webdriver.Chrome(options=options)
|
11 |
|
12 |
results = []
|
13 |
+
|
14 |
for i in range(start, end + 1, step):
|
15 |
url = f"https://www.google.com/search?q=vereine+{ort}&start={i}"
|
16 |
wd.get(url)
|
|
|
26 |
wd.quit()
|
27 |
#erg ="\n".join(results)
|
28 |
#erg=results[0]
|
29 |
+
return "\n".join(results)
|
30 |
|
31 |
result = client.predict(
|
32 |
#query=f"erstelle ein json objekt für die vereine: \n{''.join(results)}",
|