<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _build_web_processor(cls, session: AppSession):
        '''Build WebProcessor.'''
        args = session.args
        url_filter = session.factory['DemuxURLFilter']
        document_scraper = session.factory['DemuxDocumentScraper']
        file_writer = session.factory['FileWriter']
        post_data = cls._get_post_data(session.args)
        web_client = session.factory['WebClient']

        robots_txt_checker = cls._build_robots_txt_checker(session)

        http_username = args.user or args.http_user
        http_password = args.password or args.http_password
        ftp_username = args.user or args.ftp_user
        ftp_password = args.password or args.ftp_password

        fetch_rule = session.factory.new(
            'FetchRule',
            url_filter=url_filter, robots_txt_checker=robots_txt_checker,
            http_login=(http_username, http_password),
            ftp_login=(ftp_username, ftp_password),
            duration_timeout=args.session_timeout,
        )

        waiter = session.factory.new(
            'Waiter',
            wait=args.wait,
            random_wait=args.random_wait,
            max_wait=args.waitretry)

        result_rule = session.factory.new(
            'ResultRule',
            ssl_verification=args.check_certificate,
            retry_connrefused=args.retry_connrefused,
            retry_dns_error=args.retry_dns_error,
            waiter=waiter,
            statistics=session.factory['Statistics'],
        )

        processing_rule = session.factory.new(
            'ProcessingRule',
            fetch_rule,
            document_scraper=document_scraper,
            sitemaps=session.args.sitemaps,
            url_rewriter=session.factory.get('URLRewriter'),
        )

        web_processor_fetch_params = session.factory.new(
            'WebProcessorFetchParams',
            post_data=post_data,
            strong_redirects=args.strong_redirects,
            content_on_error=args.content_on_error,
        )

        processor = session.factory.new(
            'WebProcessor',
            web_client,
            web_processor_fetch_params,
        )

        return processor