51
51
52
52
from crawlee ._types import ConcurrencySettings , HttpMethod , JsonSerializable
53
53
from crawlee .base_storage_client ._models import DatasetItemsListPage
54
- from crawlee .events ._event_manager import EventManager
55
54
from crawlee .http_clients import BaseHttpClient , HttpResponse
56
55
from crawlee .proxy_configuration import ProxyConfiguration , ProxyInfo
57
56
from crawlee .sessions import Session
@@ -113,9 +112,6 @@ class BasicCrawlerOptions(TypedDict, Generic[TCrawlingContext]):
113
112
statistics : NotRequired [Statistics [StatisticsState ]]
114
113
"""A custom `Statistics` instance, allowing the use of non-default configuration."""
115
114
116
- event_manager : NotRequired [EventManager ]
117
- """A custom `EventManager` instance, allowing the use of non-default configuration."""
118
-
119
115
configure_logging : NotRequired [bool ]
120
116
"""If True, the crawler will set up logging infrastructure automatically."""
121
117
@@ -175,7 +171,6 @@ def __init__(
175
171
retry_on_blocked : bool = True ,
176
172
proxy_configuration : ProxyConfiguration | None = None ,
177
173
statistics : Statistics | None = None ,
178
- event_manager : EventManager | None = None ,
179
174
configure_logging : bool = True ,
180
175
max_crawl_depth : int | None = None ,
181
176
_context_pipeline : ContextPipeline [TCrawlingContext ] | None = None ,
@@ -202,7 +197,6 @@ def __init__(
202
197
retry_on_blocked: If True, the crawler attempts to bypass bot protections automatically.
203
198
proxy_configuration: HTTP proxy configuration used when making requests.
204
199
statistics: A custom `Statistics` instance, allowing the use of non-default configuration.
205
- event_manager: A custom `EventManager` instance, allowing the use of non-default configuration.
206
200
configure_logging: If True, the crawler will set up logging infrastructure automatically.
207
201
max_crawl_depth: Maximum crawl depth. If set, the crawler will stop crawling after reaching this depth.
208
202
_context_pipeline: Enables extending the request lifecycle and modifying the crawling context.
@@ -242,9 +236,8 @@ def __init__(
242
236
243
237
self ._tld_extractor = TLDExtract (cache_dir = tempfile .TemporaryDirectory ().name )
244
238
245
- self ._event_manager = event_manager or service_container .get_event_manager ()
239
+ self ._event_manager = service_container .get_event_manager ()
246
240
self ._snapshotter = Snapshotter (
247
- self ._event_manager ,
248
241
max_memory_size = ByteSize .from_mb (config .memory_mbytes ) if config .memory_mbytes else None ,
249
242
available_memory_ratio = config .available_memory_ratio ,
250
243
)
0 commit comments