adityaiiitr commited on
Commit
e827602
·
1 Parent(s): 81e3cae

number of links changed

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -73,7 +73,7 @@ def google_search(query, num_results=5):
73
  links = []
74
  for a in soup.find_all('a', href=True, attrs={'jsname': True}):
75
  link = a['href']
76
- if link.startswith("https://"):
77
  links.append(link)
78
  return links[:num_results]
79
 
@@ -105,7 +105,7 @@ async def crawl_web(request: CrawlerRequest):
105
  topic_title = request.topic_title
106
 
107
  # Get top 5 links from Google search
108
- google_links = google_search(topic_title, num_results=5)
109
 
110
  # Get links from Quora
111
  quora_links = advanced_search_on_site("quora.com", topic_title, num_results=10)
 
73
  links = []
74
  for a in soup.find_all('a', href=True, attrs={'jsname': True}):
75
  link = a['href']
76
+ if link.startswith("https://") and not link.includes("google.com"):
77
  links.append(link)
78
  return links[:num_results]
79
 
 
105
  topic_title = request.topic_title
106
 
107
  # Get top 5 links from Google search
108
+ google_links = google_search(topic_title, num_results=10)
109
 
110
  # Get links from Quora
111
  quora_links = advanced_search_on_site("quora.com", topic_title, num_results=10)