Update app.py
Browse files
app.py
CHANGED
@@ -184,26 +184,12 @@ if uploaded_file and api_key:
|
|
184 |
with open(output_file, "rb") as f:
|
185 |
csv_bytes = f.read()
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
st.markdown(
|
192 |
-
"""
|
193 |
-
<script>
|
194 |
-
document.getElementById('auto-download-link').click();
|
195 |
-
</script>
|
196 |
-
""",
|
197 |
-
unsafe_allow_html=True
|
198 |
)
|
199 |
|
200 |
-
|
201 |
-
st.download_button(
|
202 |
-
label="📥 Download CSV with LinkedIn Links",
|
203 |
-
data=f,
|
204 |
-
file_name="updated_with_linkedin_links.csv",
|
205 |
-
mime="text/csv"
|
206 |
-
)
|
207 |
-
shutil.rmtree(os.path.dirname(output_file)) # Cleanup temp directory
|
208 |
elif not api_key:
|
209 |
st.warning("⚠️ Please enter your BrightData SERP API key to proceed.")
|
|
|
184 |
with open(output_file, "rb") as f:
|
185 |
csv_bytes = f.read()
|
186 |
|
187 |
+
zip_and_auto_download(
|
188 |
+
file_bytes=csv_bytes,
|
189 |
+
inner_filename="updated_with_linkedin_links.csv",
|
190 |
+
zip_prefix="LinkedIn_Links"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
)
|
192 |
|
193 |
+
shutil.rmtree(os.path.dirname(output_file))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
elif not api_key:
|
195 |
st.warning("⚠️ Please enter your BrightData SERP API key to proceed.")
|