sintamar commited on
Commit
0319a8a
·
verified ·
1 Parent(s): 478431a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -29,13 +29,13 @@ def visualize(url):
29
  #st.subheader("Website title:")
30
  if xdataframe:
31
  #st.info(html_content)
32
- #st.code(html_content, language='html')
33
  # Konversi tabel HTML ke DataFrame Pandas
34
  #df = pd.read_html(str(parse_element))[0]
35
  #st.dataframe(df) # tampilkan tabel dengan format rapi Streamlit
36
  #st.components.v1.html(str(parse_element), height=600, scrolling=True)
37
  # === 6. Tampilkan di Streamlit ===
38
- st.dataframe(xdataframe)
39
  else:
40
  st.warning("Tabel tidak ditemukan.")
41
 
@@ -60,7 +60,7 @@ def take_webdata(url):
60
  soup = BeautifulSoup(html, "html.parser")
61
  div_find = soup.find("div", id="tournament-table", class_="tournament-table-standings")
62
  #table_find = div_find.find("table") if div_find else None
63
- rows = soup.find("div", class_="ui-table__row")
64
  data = []
65
  #for row in rows:
66
  #rank = row.select_one(".tableCellRank")
@@ -86,7 +86,7 @@ def take_webdata(url):
86
  #})
87
 
88
  # === 5. Buat DataFrame ===
89
- df = pd.DataFrame(data)
90
 
91
  except WebDriverException as e:
92
  return page_title
 
29
  #st.subheader("Website title:")
30
  if xdataframe:
31
  #st.info(html_content)
32
+ st.code(xdataframe, language='html')
33
  # Konversi tabel HTML ke DataFrame Pandas
34
  #df = pd.read_html(str(parse_element))[0]
35
  #st.dataframe(df) # tampilkan tabel dengan format rapi Streamlit
36
  #st.components.v1.html(str(parse_element), height=600, scrolling=True)
37
  # === 6. Tampilkan di Streamlit ===
38
+ #st.dataframe(xdataframe)
39
  else:
40
  st.warning("Tabel tidak ditemukan.")
41
 
 
60
  soup = BeautifulSoup(html, "html.parser")
61
  div_find = soup.find("div", id="tournament-table", class_="tournament-table-standings")
62
  #table_find = div_find.find("table") if div_find else None
63
+ #rows = soup.find("div", class_="ui-table__row")
64
  data = []
65
  #for row in rows:
66
  #rank = row.select_one(".tableCellRank")
 
86
  #})
87
 
88
  # === 5. Buat DataFrame ===
89
+ #df = pd.DataFrame(data)
90
 
91
  except WebDriverException as e:
92
  return page_title