Update app.py
Browse files
app.py
CHANGED
@@ -27,12 +27,6 @@ def get_backlinks(api_login, api_key, target_url, filters):
|
|
27 |
|
28 |
response_json = response.json()
|
29 |
|
30 |
-
# Log the full response for debugging
|
31 |
-
st.text("API Response:")
|
32 |
-
st.text(f"Response Status Code: {response.status_code}")
|
33 |
-
st.text(f"Response Headers: {response.headers}")
|
34 |
-
st.text(f"Response Body: {response_json}") # Now response_json is defined
|
35 |
-
|
36 |
# Check if the response contains 'results' key and handle the JSON structure appropriately
|
37 |
if response.status_code == 200:
|
38 |
response_data = response.json()
|
@@ -73,10 +67,11 @@ api_key = st.sidebar.text_input("API Key", type="password")
|
|
73 |
|
74 |
# Filters input
|
75 |
st.sidebar.title("Filters")
|
76 |
-
|
|
|
77 |
backlink_spam_score = st.sidebar.number_input("Backlink Spam Score ≤", value=20)
|
78 |
page_from_rank_value = st.sidebar.number_input("Page From Rank Value ≥", value=0)
|
79 |
-
domain_from_rank_value = st.sidebar.number_input("Domain From Rank Value ≥", value=
|
80 |
page_from_language = st.sidebar.selectbox("Page From Language", ['en', 'other'])
|
81 |
is_lost = st.sidebar.checkbox("Is Lost", value=False)
|
82 |
dofollow = st.sidebar.checkbox("Dofollow", value=False)
|
@@ -121,11 +116,6 @@ filters.append("and")
|
|
121 |
if filters and filters[-1] == "and":
|
122 |
filters.pop()
|
123 |
|
124 |
-
# Output the entire filters section
|
125 |
-
st.text("Current filters:")
|
126 |
-
for f in filters:
|
127 |
-
st.text(f)
|
128 |
-
|
129 |
# Main app layout
|
130 |
col1, col2 = st.columns(2)
|
131 |
|
|
|
27 |
|
28 |
response_json = response.json()
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
# Check if the response contains 'results' key and handle the JSON structure appropriately
|
31 |
if response.status_code == 200:
|
32 |
response_data = response.json()
|
|
|
67 |
|
68 |
# Filters input
|
69 |
st.sidebar.title("Filters")
|
70 |
+
st.text ("A maximum of 8 filters is allowed through the API, that includes one for every comma separated value below, one for every value not equal to 0 in the boxes below, one for language, and one for each button ticked.")
|
71 |
+
url_from_not_contain = st.sidebar.text_input("URL from does not contain (comma-separated)", value="keyword,blogspot,/search,/tag")
|
72 |
backlink_spam_score = st.sidebar.number_input("Backlink Spam Score ≤", value=20)
|
73 |
page_from_rank_value = st.sidebar.number_input("Page From Rank Value ≥", value=0)
|
74 |
+
domain_from_rank_value = st.sidebar.number_input("Domain From Rank Value ≥", value=100)
|
75 |
page_from_language = st.sidebar.selectbox("Page From Language", ['en', 'other'])
|
76 |
is_lost = st.sidebar.checkbox("Is Lost", value=False)
|
77 |
dofollow = st.sidebar.checkbox("Dofollow", value=False)
|
|
|
116 |
if filters and filters[-1] == "and":
|
117 |
filters.pop()
|
118 |
|
|
|
|
|
|
|
|
|
|
|
119 |
# Main app layout
|
120 |
col1, col2 = st.columns(2)
|
121 |
|