MCPcopy
hub / github.com/D4Vinci/Scrapling / __http_command

Function __http_command

scrapling/cli.py:346–352  ·  view source on GitHub ↗

Shared implementation for HTTP extract commands.

(
    method_name: str, url: str, output_file: str, css_selector: Optional[str], ai_targeted: bool = False, **kwargs
)

Source from the content-addressed store, hash-verified

344
345
346def __http_command(
347 method_name: str, url: str, output_file: str, css_selector: Optional[str], ai_targeted: bool = False, **kwargs
348) -> None:
349 """Shared implementation for HTTP extract commands."""
350 from scrapling.fetchers import Fetcher
351
352 __Request_and_Save(getattr(Fetcher, method_name), url, output_file, css_selector, ai_targeted=ai_targeted, **kwargs)
353
354
355@extract.command(help=f"Perform a GET request and save the content to a file.\n\n{__OUTPUT_FILE_HELP__}")

Callers 4

getFunction · 0.85
postFunction · 0.85
putFunction · 0.85
deleteFunction · 0.85

Calls 1

__Request_and_SaveFunction · 0.85

Tested by

no test coverage detected