diff --git a/pyproject.toml b/pyproject.toml index 3a8fb64..8edfd46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ license = "MIT" name = "pyrobbot" readme = "README.md" - version = "0.6.3" + version = "0.6.4" [build-system] build-backend = "poetry.core.masonry.api" diff --git a/pyrobbot/internet_utils.py b/pyrobbot/internet_utils.py index e90faaa..7360093 100644 --- a/pyrobbot/internet_utils.py +++ b/pyrobbot/internet_utils.py @@ -93,11 +93,13 @@ def raw_websearch( region: str = GeneralDefinitions.IPINFO["country_name"], ): """Search the web using DuckDuckGo Search API.""" - results = asyncio.run( + raw_results = asyncio.run( async_raw_websearch(query=query, max_results=max_results, region=region) ) + raw_results = raw_results or [] - for result in results: + results = [] + for result in raw_results: if not isinstance(result, dict): logger.error("Expected a `dict`, got type {}: {}", type(result), result) results.append({})