mgokg commited on
Commit
1129a27
·
verified ·
1 Parent(s): 6d9b736

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -141,7 +141,19 @@ with gr.Blocks() as demo:
141
 
142
  def process_ort(ort):
143
  links_text, links = parse_links_and_content(ort)
144
- return links_text
 
 
 
 
 
 
 
 
 
 
 
 
145
  contact_details = scrape_links(links)
146
 
147
  from gradio_client import Client
 
141
 
142
  def process_ort(ort):
143
  links_text, links = parse_links_and_content(ort)
144
+ #return links_text
145
+ kontakt = []
146
+ for verein in links_text:
147
+ url = f"https://www.google.com/search?q=impressum+{verein}"
148
+ response = requests.get(link)
149
+ response.raise_for_status()
150
+ soup = BeautifulSoup(response.content, 'html.parser')
151
+ detail = soup.select_one('#rso > div:nth-child(1) > div')
152
+ kontakt.append(detail.text)
153
+
154
+
155
+ return kontakt
156
+
157
  contact_details = scrape_links(links)
158
 
159
  from gradio_client import Client