Update app.py
Browse files
app.py
CHANGED
@@ -44,8 +44,13 @@ reset_button = st.sidebar.button("Reset")
|
|
44 |
|
45 |
# Make sure to pass api_login to the get_backlinks function
|
46 |
if generate_button and target_url:
|
47 |
-
data = get_backlinks(
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
# Filters
|
51 |
url_from_not_contain = st.sidebar.text_input("URL from does not contain (comma-separated)")
|
|
|
44 |
|
45 |
# Make sure to pass api_login to the get_backlinks function
|
46 |
if generate_button and target_url:
|
47 |
+
data = get_backlinks(api_key, target_url, filters)
|
48 |
+
if data:
|
49 |
+
df = pd.DataFrame(data)
|
50 |
+
csv = df.to_csv(index=False)
|
51 |
+
b64 = base64.b64encode(csv.encode()).decode()
|
52 |
+
href = f'<a href="data:file/csv;base64,{b64}" download="backlinks.csv">Download CSV file</a>'
|
53 |
+
st.markdown(href, unsafe_allow_html=True)
|
54 |
|
55 |
# Filters
|
56 |
url_from_not_contain = st.sidebar.text_input("URL from does not contain (comma-separated)")
|