Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,11 @@ def get_impressum_text(search_term):
|
|
35 |
|
36 |
#search_results = google_search(search_term)
|
37 |
url = f"https://cse.google.com/cse?cx=77f1602c0ff764edb&q=impressum {search_term}"
|
38 |
-
|
|
|
|
|
|
|
|
|
39 |
if 'items' in search_results:
|
40 |
for item in search_results['items']:
|
41 |
link = item['link']
|
|
|
35 |
|
36 |
#search_results = google_search(search_term)
|
37 |
url = f"https://cse.google.com/cse?cx=77f1602c0ff764edb&q=impressum {search_term}"
|
38 |
+
response = requests.get(url, headers=headers)
|
39 |
+
soup = BeautifulSoup(response.content, 'html.parser')
|
40 |
+
impressum_div = soup.find('div', class_='MjjYud')
|
41 |
+
return impressum_div.text.strip()
|
42 |
+
|
43 |
if 'items' in search_results:
|
44 |
for item in search_results['items']:
|
45 |
link = item['link']
|