diff --git a/source_collectors/auto_googler/AutoGooglerCollector.py b/source_collectors/auto_googler/AutoGooglerCollector.py index 1748d911..01387d0b 100644 --- a/source_collectors/auto_googler/AutoGooglerCollector.py +++ b/source_collectors/auto_googler/AutoGooglerCollector.py @@ -1,13 +1,13 @@ -import asyncio from collector_manager.AsyncCollectorBase import AsyncCollectorBase from collector_manager.enums import CollectorType +from core.EnvVarManager import EnvVarManager from core.preprocessors.AutoGooglerPreprocessor import AutoGooglerPreprocessor from source_collectors.auto_googler.AutoGoogler import AutoGoogler from source_collectors.auto_googler.DTOs import AutoGooglerInputDTO, AutoGooglerInnerOutputDTO from source_collectors.auto_googler.GoogleSearcher import GoogleSearcher from source_collectors.auto_googler.SearchConfig import SearchConfig -from util.helper_functions import get_from_env, base_model_list_dump +from util.helper_functions import base_model_list_dump class AutoGooglerCollector(AsyncCollectorBase): @@ -16,14 +16,15 @@ class AutoGooglerCollector(AsyncCollectorBase): async def run_to_completion(self) -> AutoGoogler: dto: AutoGooglerInputDTO = self.dto + env_var_manager = EnvVarManager.get() auto_googler = AutoGoogler( search_config=SearchConfig( urls_per_result=dto.urls_per_result, queries=dto.queries, ), google_searcher=GoogleSearcher( - api_key=get_from_env("GOOGLE_API_KEY"), - cse_id=get_from_env("GOOGLE_CSE_ID"), + api_key=env_var_manager.google_api_key, + cse_id=env_var_manager.google_cse_id, ) ) async for log in auto_googler.run(): diff --git a/tests/test_automated/integration/source_collectors/__init__.py b/tests/test_automated/integration/source_collectors/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/test_automated/integration/source_collectors/test_example_collector.py b/tests/test_automated/integration/source_collectors/test_example_collector.py deleted file mode 100644 index e69de29b..00000000