Override Qt method.

def queryProxy(self, query):
        """Override Qt method."""
        # Query is a QNetworkProxyQuery
        valid_proxies = []

        query_scheme = query.url().scheme()
        query_host = query.url().host()
        query_scheme_host = '{0}://{1}'.format(query_scheme, query_host)
        proxy_servers = process_proxy_servers(self.proxy_servers)
#        print(proxy_servers)

        if proxy_servers:
            for key in proxy_servers:
                proxy_settings = proxy_servers[key]

                if key == 'http' and query_scheme == 'http':
                    proxy = self._create_proxy(proxy_settings)
                    valid_proxies.append(proxy)
                elif key == 'https' and query_scheme == 'https':
                    proxy = self._create_proxy(proxy_settings)
                    valid_proxies.append(proxy)

                if key == query_scheme_host:
                    proxy = self._create_proxy(proxy_settings)
                    valid_proxies.append(proxy)
        else:
            valid_proxies.append(QNetworkProxy(QNetworkProxy.DefaultProxy))

#        print('factoy', query.url().toString())
#        print(valid_proxies)
#        for pr in valid_proxies:
#            user = pr.user()
#            password = pr.password()
#            host = pr.hostName()
#            port = pr.port()
#            print(query.url(), user, password, host, port)
#        print('\n')
        return valid_proxies