mgokg commited on
Commit
b74e7f8
·
verified ·
1 Parent(s): a28b6b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -48,7 +48,7 @@ def parse_links_and_content(ort):
48
  if target_div:
49
  #links = [urljoin(base_url, a['href']) for a in target_div.find_all('a', href=True)]
50
  texts = [a.text for a in target_div.find_all('a', href=True)]
51
- print(texts)
52
  all_links.extend(texts)
53
  else:
54
  print(f"Target div not found on page {page_number}")
@@ -85,8 +85,8 @@ with gr.Blocks() as demo:
85
  gr.Markdown("# ")
86
  with gr.Row():
87
  ort_input = gr.Textbox(label="Ort", placeholder="Gib den Namen des Ortes ein")
88
- #links_output = gr.Textbox(label="Vereinsliste")
89
- links_output = gr.DataFrame(label="Ergebnisse")
90
  #json_output = gr.JSON(label="Ergebnisse")
91
 
92
  def process_ort(ort):
@@ -98,7 +98,7 @@ with gr.Blocks() as demo:
98
  #return f"[Download CSV](contact_details.csv)", json_data
99
  #return json_data
100
  #return contact
101
- return pd.DataFrame(json_data)
102
  #return json_data
103
 
104
  # Button zum Starten der Parsung
 
48
  if target_div:
49
  #links = [urljoin(base_url, a['href']) for a in target_div.find_all('a', href=True)]
50
  texts = [a.text for a in target_div.find_all('a', href=True)]
51
+ #print(texts)
52
  all_links.extend(texts)
53
  else:
54
  print(f"Target div not found on page {page_number}")
 
85
  gr.Markdown("# ")
86
  with gr.Row():
87
  ort_input = gr.Textbox(label="Ort", placeholder="Gib den Namen des Ortes ein")
88
+ links_output = gr.Textbox(label="Vereinsliste")
89
+ #links_output = gr.DataFrame(label="Ergebnisse")
90
  #json_output = gr.JSON(label="Ergebnisse")
91
 
92
  def process_ort(ort):
 
98
  #return f"[Download CSV](contact_details.csv)", json_data
99
  #return json_data
100
  #return contact
101
+ return json_data
102
  #return json_data
103
 
104
  # Button zum Starten der Parsung