Skip to main content

HeaderGenerator

Generate realistic looking or browser-like HTTP headers.

Index

Methods

__init__

  • __init__(): None
  • Returns None

get_common_headers

  • Get common HTTP headers ("Accept", "Accept-Language").

    We do not modify the "Accept-Encoding", "Connection" and other headers. They should be included and handled by the HTTP client or browser.


    Returns HttpHeaders

get_random_user_agent_header

get_sec_ch_ua_headers

get_specific_headers

  • get_specific_headers(header_names, browser_type): HttpHeaders
  • Return subset of headers based on the selected header_names.

    If no header_names are specified, full unfiltered headers are returned.


    Parameters

    Returns HttpHeaders

get_user_agent_header