|
5 | 5 |
|
6 | 6 | # The following imports are wrapped in try_import to handle optional dependencies (the `pydantic-ai` extra), |
7 | 7 | # ensuring the module can still function even if these dependencies are missing. |
8 | | -with _try_import(__name__, 'PydanticAiCrawler'): |
| 8 | +with _try_import(__name__, 'PydanticAiCrawler', extra_name='pydantic-ai'): |
9 | 9 | from ._pydantic_ai_crawler import PydanticAiCrawler |
10 | | -with _try_import(__name__, 'PydanticAiCrawlingContext'): |
| 10 | +with _try_import(__name__, 'PydanticAiCrawlingContext', extra_name='pydantic-ai'): |
11 | 11 | from ._pydantic_ai_crawling_context import PydanticAiCrawlingContext |
12 | | -with _try_import(__name__, 'BasePydanticAiHtmlExtractor'): |
| 12 | +with _try_import(__name__, 'BasePydanticAiHtmlExtractor', extra_name='pydantic-ai'): |
13 | 13 | from ._base_extractor import BasePydanticAiHtmlExtractor |
14 | | -with _try_import(__name__, 'PydanticAiDirectExtractor'): |
| 14 | +with _try_import(__name__, 'PydanticAiDirectExtractor', extra_name='pydantic-ai'): |
15 | 15 | from ._direct_extractor import PydanticAiDirectExtractor |
16 | | -with _try_import(__name__, 'PydanticAiSelectorExtractor'): |
| 16 | +with _try_import(__name__, 'PydanticAiSelectorExtractor', extra_name='pydantic-ai'): |
17 | 17 | from ._selector_extractor import PydanticAiSelectorExtractor |
18 | | -with _try_import(__name__, 'BasePydanticAiHtmlDistiller'): |
| 18 | +with _try_import(__name__, 'BasePydanticAiHtmlDistiller', extra_name='pydantic-ai'): |
19 | 19 | from ._base_distiller import BasePydanticAiHtmlDistiller |
20 | | -with _try_import(__name__, 'PydanticAiCleanHtmlDistiller'): |
| 20 | +with _try_import(__name__, 'PydanticAiCleanHtmlDistiller', extra_name='pydantic-ai'): |
21 | 21 | from ._clean_html_distiller import PydanticAiCleanHtmlDistiller |
22 | | -with _try_import(__name__, 'PydanticAiSkeletonDistiller'): |
| 22 | +with _try_import(__name__, 'PydanticAiSkeletonDistiller', extra_name='pydantic-ai'): |
23 | 23 | from ._skeleton_distiller import PydanticAiSkeletonDistiller |
24 | | -with _try_import(__name__, 'PydanticAiHtmlDistiller', 'PydanticAiHtmlExtractor', 'PydanticAiUsageStats'): |
| 24 | +with _try_import( |
| 25 | + __name__, 'PydanticAiHtmlDistiller', 'PydanticAiHtmlExtractor', 'PydanticAiUsageStats', extra_name='pydantic-ai' |
| 26 | +): |
25 | 27 | from ._types import PydanticAiHtmlDistiller, PydanticAiHtmlExtractor, PydanticAiUsageStats |
26 | | -with _try_import(__name__, 'get_basic_http_cleaner'): |
| 28 | +with _try_import(__name__, 'get_basic_http_cleaner', extra_name='pydantic-ai'): |
27 | 29 | from ._utils import get_basic_http_cleaner |
28 | 30 |
|
29 | 31 | __all__ = [ |
|
0 commit comments