afaceuser09 commited on
Commit
ccba0bb
·
verified ·
1 Parent(s): 78f2b74

Update search_pipeline.py

Browse files
Files changed (1) hide show
  1. search_pipeline.py +3 -7
search_pipeline.py CHANGED
@@ -168,11 +168,7 @@ async def scrape_target_url(client, result: dict):
168
  url = result["href"]
169
 
170
  try:
171
- response = await client.get(
172
- url,
173
- timeout=12.0,
174
- follow_redirects=True,
175
- )
176
 
177
  if response.status_code != 200:
178
  logger.warning(
@@ -276,7 +272,7 @@ async def build_context_pipeline(
276
 
277
  scraped = await asyncio.gather(
278
  *tasks,
279
- return_exceptions=False,
280
  )
281
  else:
282
  async with httpx.AsyncClient(
@@ -290,7 +286,7 @@ async def build_context_pipeline(
290
 
291
  scraped = await asyncio.gather(
292
  *tasks,
293
- return_exceptions=False,
294
  )
295
 
296
  blocks = []
 
168
  url = result["href"]
169
 
170
  try:
171
+ response = await client.get(url, timeout=12.0)
 
 
 
 
172
 
173
  if response.status_code != 200:
174
  logger.warning(
 
272
 
273
  scraped = await asyncio.gather(
274
  *tasks,
275
+ return_exceptions=True,
276
  )
277
  else:
278
  async with httpx.AsyncClient(
 
286
 
287
  scraped = await asyncio.gather(
288
  *tasks,
289
+ return_exceptions=True,
290
  )
291
 
292
  blocks = []