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

Function get

scrapling/cli.py:359–387  ·  view source on GitHub ↗

Perform a GET request and save the content to a file.

(
    url,
    output_file,
    headers,
    cookies,
    timeout,
    proxy,
    css_selector,
    params,
    follow_redirects,
    verify,
    impersonate,
    stealthy_headers,
    ai_targeted,
)

Source from the content-addressed store, hash-verified

357@argument("output_file", required=True)
358@_common_http_options
359def get(
360 url,
361 output_file,
362 headers,
363 cookies,
364 timeout,
365 proxy,
366 css_selector,
367 params,
368 follow_redirects,
369 verify,
370 impersonate,
371 stealthy_headers,
372 ai_targeted,
373):
374 """Perform a GET request and save the content to a file."""
375 kwargs = __BuildRequest(
376 headers,
377 cookies,
378 params,
379 None,
380 timeout=timeout,
381 follow_redirects=follow_redirects,
382 verify=verify,
383 stealthy_headers=stealthy_headers,
384 impersonate=impersonate,
385 proxy=proxy,
386 )
387 __http_command("get", url, output_file, css_selector, ai_targeted=ai_targeted, **kwargs)
388
389
390@extract.command(help=f"Perform a POST request and save the content to a file.\n\n{__OUTPUT_FILE_HELP__}")

Callers

nothing calls this directly

Calls 2

__BuildRequestFunction · 0.85
__http_commandFunction · 0.85

Tested by

no test coverage detected