Pamudu13 commited on
Commit
58c842e
·
verified ·
1 Parent(s): 053aa6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -161,7 +161,7 @@ def scrape_website(url, headers):
161
  return {
162
  'title': clean_text(title),
163
  'meta_description': clean_text(meta_desc),
164
- 'content': text[:1000], # Limit content length
165
  'url': url
166
  }
167
 
@@ -205,8 +205,8 @@ def search_and_scrape(query, num_results=5):
205
  href = link.get('href', '')
206
 
207
  # Skip if not a valid URL or if it's a Google-related URL
208
- if not href.startswith('http') or 'google.' in href:
209
- continue
210
 
211
  # Add random delay between requests
212
  time.sleep(random.uniform(1, 2))
 
161
  return {
162
  'title': clean_text(title),
163
  'meta_description': clean_text(meta_desc),
164
+ 'content': text[:10000], # Limit content length
165
  'url': url
166
  }
167
 
 
205
  href = link.get('href', '')
206
 
207
  # Skip if not a valid URL or if it's a Google-related URL
208
+ # if not href.startswith('http') or 'google.' in href:
209
+ # continue
210
 
211
  # Add random delay between requests
212
  time.sleep(random.uniform(1, 2))