Shared implementation for HTTP extract commands.
(
method_name: str, url: str, output_file: str, css_selector: Optional[str], ai_targeted: bool = False, **kwargs
)
| 344 | |
| 345 | |
| 346 | def __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__}") |
no test coverage detected