Guides

Fetching Data

To fetch data from a URL, use the fetch command.

Command Syntax:

asrch fetch --url <URL> --get <GET>

Options:

  • –url <URL>: The URL from which to fetch data.

  • –get <GET>: The type of data to fetch (e.g., “html”, “page”, “body”).

Examples:

  1. Fetch HTML data from a URL:

    asrch fetch --url https://example.com --get html
    

    This command will fetch the HTML content from https://example.com.

  2. Fetch the body content from a URL:

    asrch fetch --url https://example.com --get body
    

    This command will fetch the body content of the page at https://example.com.

Error Handling

If an error occurs during the fetch operation, it will be printed to the standard error output.