joshuadunlop commited on
Commit
bbf602c
·
verified ·
1 Parent(s): 84eae57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -25,11 +25,13 @@ def get_backlinks(api_login, api_key, target_url, filters):
25
  # Making the API request
26
  response = requests.post("https://api.dataforseo.com/v3/backlinks/backlinks/live", json=post_data, headers=headers)
27
 
 
 
28
  # Log the full response for debugging
29
  st.text("API Response:")
30
  st.text(f"Response Status Code: {response.status_code}")
31
  st.text(f"Response Headers: {response.headers}")
32
- st.text(f"Response Body: {response_json}")
33
 
34
  # Check if the response contains 'results' key and handle the JSON structure appropriately
35
  if response.status_code == 200:
 
25
  # Making the API request
26
  response = requests.post("https://api.dataforseo.com/v3/backlinks/backlinks/live", json=post_data, headers=headers)
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: