def load_proxylist(
        self,
        source: str | BaseProxySource,
        source_type: None | str = None,
        proxy_type: str = "http",
        auto_init: bool = True,
        auto_change: bool = True,
    ) -> None:
        """Load proxy list.

        :param source: Proxy source.
            Accepts string (file path, url) or ``BaseProxySource`` instance.
        :param source_type: The type of the specified source.
            Should be one of the following: 'text_file' or 'url'.
        :param proxy_type:
            Should be one of the following: 'socks4', 'socks5' or'http'.
        :param auto_change:
            If set to `True` then automatically random proxy rotation
            will be used.

        Proxy source format should be one of the following (for each line):
        - ip:port
        - ip:port:login:password
        """
        if isinstance(source, BaseProxySource):
            self.proxylist = ProxyList(source)
        elif isinstance(source, str):
            if source_type == "text_file":
                self.proxylist = ProxyList.from_local_file(
                    source, proxy_type=proxy_type
                )
            elif source_type == "url":
                self.proxylist = ProxyList.from_network_file(
                    source, proxy_type=proxy_type
                )
            else:
                raise SpiderMisuseError(
                    "Method `load_proxylist` received "
                    "invalid `source_type` argument: %s" % source_type
                )
        else:
            raise SpiderMisuseError(
                "Method `load_proxylist` received "
                "invalid `source` argument: %s" % source
            )

        self.proxylist_enabled = True
        self.proxy = None
        if not auto_change and auto_init:
            self.proxy = self.proxylist.get_random_server()
            if not self.proxy.proxy_type:
                raise GrabMisuseError("Could not use proxy without defined proxy type")
        self.proxy_auto_change = auto_change
Load proxy list.

        :param source: Proxy source.
            Accepts string (file path, url) or ``BaseProxySource`` instance.
        :param source_type: The type of the specified source.
            Should be one of the following: 'text_file' or 'url'.
        :param proxy_type:
            Should be one of the following: 'socks4', 'socks5' or'http'.
        :param auto_change:
            If set to `True` then automatically random proxy rotation
            will be used.

        Proxy source format should be one of the following (for each line):
        - ip:port
        - ip:port:login:password
        
grab/spider/base.py