poemsforaphrodite commited on
Commit
c6b94ed
1 Parent(s): 9f7dd1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -150,7 +150,7 @@ def fetch_content(url):
150
  response.raise_for_status()
151
  soup = BeautifulSoup(response.text, 'html.parser')
152
  content = soup.get_text(separator=' ', strip=True)
153
- logger.debug(f"Fetched {len(content)} characters from {url}")
154
  return content
155
  except requests.RequestException as e:
156
  logger.error(f"Error fetching content from {url}: {e}")
@@ -228,13 +228,13 @@ def show_competitor_analysis(row, co):
228
  logger.error(f"Our page '{row['page']}' is missing from the results.")
229
 
230
  # Additional debugging information
231
- st.write("Debugging Information:")
232
- st.json({
233
- "our_url": row['page'],
234
- "query": row['query'],
235
- "content_fetched": fetch_content(row['page']),
236
- "urls_processed": results_df['url'].tolist()
237
- })
238
  else:
239
  our_rank = our_data.index[0] + 1
240
  total_results = len(results_df)
 
150
  response.raise_for_status()
151
  soup = BeautifulSoup(response.text, 'html.parser')
152
  content = soup.get_text(separator=' ', strip=True)
153
+ #logger.debug(f"Fetched {len(content)} characters from {url}")
154
  return content
155
  except requests.RequestException as e:
156
  logger.error(f"Error fetching content from {url}: {e}")
 
228
  logger.error(f"Our page '{row['page']}' is missing from the results.")
229
 
230
  # Additional debugging information
231
+ # st.write("Debugging Information:")
232
+ # st.json({
233
+ # "our_url": row['page'],
234
+ # "query": row['query'],
235
+ # "content_fetched": fetch_content(row['page']),
236
+ # "urls_processed": results_df['url'].tolist()
237
+ # })
238
  else:
239
  our_rank = our_data.index[0] + 1
240
  total_results = len(results_df)