refac
This commit is contained in:
@@ -30,7 +30,7 @@ def search_firecrawl(
|
||||
timeout=count * 3 + 10,
|
||||
)
|
||||
response.raise_for_status()
|
||||
data = response.json().get('data', {})
|
||||
data = response.json().get('data', [])
|
||||
|
||||
results = [
|
||||
SearchResult(
|
||||
@@ -38,7 +38,7 @@ def search_firecrawl(
|
||||
title=r.get('title', ''),
|
||||
snippet=r.get('description', ''),
|
||||
)
|
||||
for r in data.get('web', [])
|
||||
for r in (data if isinstance(data, list) else [])
|
||||
]
|
||||
|
||||
if filter_list:
|
||||
|
||||
@@ -5,6 +5,8 @@ import socket
|
||||
import ssl
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
import requests
|
||||
from datetime import datetime, time, timedelta
|
||||
from typing import (
|
||||
Any,
|
||||
|
||||
Reference in New Issue
Block a user