fix: Fixes to handle the new extra deps group
This commit is contained in:
+3
-3
@@ -10,10 +10,10 @@ from orjson import loads as json_loads, JSONDecodeError
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from click import command, option, Choice, group, argument
|
from click import command, option, Choice, group, argument
|
||||||
except ImportError:
|
except (ImportError, ModuleNotFoundError) as e:
|
||||||
raise ImportError(
|
raise ModuleNotFoundError(
|
||||||
"You need to install scrapling with any of the extras to enable Shell commands. See: https://scrapling.readthedocs.io/en/latest/#installation"
|
"You need to install scrapling with any of the extras to enable Shell commands. See: https://scrapling.readthedocs.io/en/latest/#installation"
|
||||||
)
|
) from e
|
||||||
|
|
||||||
__OUTPUT_FILE_HELP__ = "The output file path can be an HTML file, a Markdown file of the HTML content, or the text content itself. Use file extensions (`.html`/`.md`/`.txt`) respectively."
|
__OUTPUT_FILE_HELP__ = "The output file path can be an HTML file, a Markdown file of the HTML content, or the text content itself. Use file extensions (`.html`/`.md`/`.txt`) respectively."
|
||||||
__PACKAGE_DIR__ = Path(__file__).parent
|
__PACKAGE_DIR__ = Path(__file__).parent
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from mcp.server.fastmcp import FastMCP
|
|||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from scrapling.core.shell import Convertor
|
from scrapling.core.shell import Convertor
|
||||||
from scrapling.engines.toolbelt import Response as _ScraplingResponse
|
from scrapling.engines.toolbelt.custom import Response as _ScraplingResponse
|
||||||
from scrapling.fetchers import (
|
from scrapling.fetchers import (
|
||||||
Fetcher,
|
Fetcher,
|
||||||
FetcherSession,
|
FetcherSession,
|
||||||
|
|||||||
@@ -24,13 +24,9 @@ from scrapling.core._types import (
|
|||||||
Any,
|
Any,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .toolbelt import (
|
from .toolbelt.custom import Response
|
||||||
Response,
|
|
||||||
generate_headers,
|
|
||||||
__default_useragent__,
|
|
||||||
)
|
|
||||||
from .toolbelt.convertor import ResponseFactory
|
from .toolbelt.convertor import ResponseFactory
|
||||||
from .toolbelt.fingerprints import generate_convincing_referer
|
from .toolbelt.fingerprints import generate_convincing_referer, generate_headers, __default_useragent__
|
||||||
|
|
||||||
_UNSET = object()
|
_UNSET = object()
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1 @@
|
|||||||
from .custom import (
|
|
||||||
BaseFetcher,
|
|
||||||
Response,
|
|
||||||
StatusText,
|
|
||||||
get_variable_name,
|
|
||||||
)
|
|
||||||
from .fingerprints import (
|
|
||||||
generate_headers,
|
|
||||||
get_os_name,
|
|
||||||
__default_useragent__,
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ Functions related to custom types or type checking
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from email.message import Message
|
|
||||||
|
|
||||||
from scrapling.core.utils import log
|
from scrapling.core.utils import log
|
||||||
from scrapling.core._types import (
|
from scrapling.core._types import (
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from scrapling.engines._browsers import (
|
|||||||
AsyncDynamicSession,
|
AsyncDynamicSession,
|
||||||
AsyncStealthySession,
|
AsyncStealthySession,
|
||||||
)
|
)
|
||||||
from scrapling.engines.toolbelt import BaseFetcher, Response
|
from scrapling.engines.toolbelt.custom import BaseFetcher, Response
|
||||||
|
|
||||||
__FetcherClientInstance__ = _FetcherClient()
|
__FetcherClientInstance__ = _FetcherClient()
|
||||||
__AsyncFetcherClientInstance__ = _AsyncFetcherClient()
|
__AsyncFetcherClientInstance__ = _AsyncFetcherClient()
|
||||||
|
|||||||
Reference in New Issue
Block a user