Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,11 +20,12 @@ def visualize(url):
|
|
| 20 |
# Fetch and display the website content
|
| 21 |
with st.spinner("loading website data ..."):
|
| 22 |
# innerHTML = get_innerHTML(url)
|
| 23 |
-
html_content = take_webdata(url)
|
| 24 |
st.subheader("Website title:")
|
| 25 |
if html_content:
|
| 26 |
-
st.info(html_content)
|
| 27 |
-
st.code(html_content, language='html')
|
|
|
|
| 28 |
else:
|
| 29 |
st.error("Error: empty html content")
|
| 30 |
|
|
|
|
| 20 |
# Fetch and display the website content
|
| 21 |
with st.spinner("loading website data ..."):
|
| 22 |
# innerHTML = get_innerHTML(url)
|
| 23 |
+
html_content, parse_element = take_webdata(url)
|
| 24 |
st.subheader("Website title:")
|
| 25 |
if html_content:
|
| 26 |
+
#st.info(html_content)
|
| 27 |
+
#st.code(html_content, language='html')
|
| 28 |
+
st.markdown(parse_element.prettify(), unsafe_allow_html=True)
|
| 29 |
else:
|
| 30 |
st.error("Error: empty html content")
|
| 31 |
|