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