Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,9 +52,6 @@ def simple_web_scraper(url, scrape_option):
|
|
| 52 |
st.write("No relevant data found on the page.")
|
| 53 |
return
|
| 54 |
|
| 55 |
-
# Display the data in a table
|
| 56 |
-
st.table(output_data)
|
| 57 |
-
|
| 58 |
# Save data to a temporary CSV file
|
| 59 |
df = pd.DataFrame(output_data)
|
| 60 |
csv_file = tempfile.NamedTemporaryFile(delete=False, suffix=".csv")
|
|
@@ -62,7 +59,7 @@ def simple_web_scraper(url, scrape_option):
|
|
| 62 |
|
| 63 |
# Provide a download button for the CSV file
|
| 64 |
st.download_button(
|
| 65 |
-
label="Download Data as CSV",
|
| 66 |
data=open(csv_file.name, "rb").read(),
|
| 67 |
file_name="scraped_data.csv",
|
| 68 |
mime="text/csv",
|
|
|
|
| 52 |
st.write("No relevant data found on the page.")
|
| 53 |
return
|
| 54 |
|
|
|
|
|
|
|
|
|
|
| 55 |
# Save data to a temporary CSV file
|
| 56 |
df = pd.DataFrame(output_data)
|
| 57 |
csv_file = tempfile.NamedTemporaryFile(delete=False, suffix=".csv")
|
|
|
|
| 59 |
|
| 60 |
# Provide a download button for the CSV file
|
| 61 |
st.download_button(
|
| 62 |
+
label="Download Scraped Data as CSV",
|
| 63 |
data=open(csv_file.name, "rb").read(),
|
| 64 |
file_name="scraped_data.csv",
|
| 65 |
mime="text/csv",
|