-
Notifications
You must be signed in to change notification settings - Fork 713
Expand file tree
/
Copy path__init__.py
More file actions
18 lines (14 loc) · 928 Bytes
/
__init__.py
File metadata and controls
18 lines (14 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from crawlee._utils.try_import import install_import_hook as _install_import_hook
from crawlee._utils.try_import import try_import as _try_import
_install_import_hook(__name__)
# The following imports are wrapped in try_import to handle optional dependencies,
# ensuring the module can still function even if these dependencies are missing.
with _try_import(__name__, 'BrowserPool'):
from ._browser_pool import BrowserPool
with _try_import(__name__, 'PlaywrightBrowserController'):
from ._playwright_browser_controller import PlaywrightBrowserController
with _try_import(__name__, 'PlaywrightBrowserPlugin'):
from ._playwright_browser_plugin import PlaywrightBrowserPlugin
with _try_import(__name__, 'PlaywrightPersistentBrowser'):
from ._playwright_browser import PlaywrightPersistentBrowser
__all__ = ['BrowserPool', 'PlaywrightBrowserController', 'PlaywrightBrowserPlugin', 'PlaywrightPersistentBrowser']