def __init__(self, settings=None):
if settings is None:<EOL><INDENT>settings = {}<EOL><DEDENT>super(WebScraper, self).__init__(settings)<EOL>self.url = settings.get('<STR_LIT:url>', None)<EOL>self.scheme = settings.get('<STR_LIT>', None)<EOL>self.timeout = settings.get('<STR_LIT>', None)<EOL>cache_sett = settings.get('<STR_LIT>')<EOL>self.cache = NullCache()<EOL>"""<STR_LIT>"""<EOL>if cache_sett:<EOL><INDENT>self.cache = FileCache(cache_sett)<EOL><DEDENT>self._auth_method = settings.get('<STR_LIT>', None)<EOL>self._auth_username = settings.get('<STR_LIT>', None)<EOL>self._auth_password = settings.get('<STR_LIT>', None)<EOL>self.session = None<EOL>"""<STR_LIT>"""<EOL>self._handle_redirect = settings.get('<STR_LIT>', True)<EOL>agent_browser = default_user_agents['<STR_LIT>']['<STR_LIT>']<EOL>agent_os = default_user_agents['<STR_LIT>']['<STR_LIT>']<EOL>agent = settings.get('<STR_LIT>', None)<EOL>if "<STR_LIT>" in settings:<EOL><INDENT>brow = settings['<STR_LIT>']<EOL>agent_browser = default_user_agents['<STR_LIT>'].get(brow, None)<EOL><DEDENT>if "<STR_LIT>" in settings:<EOL><INDENT>os = settings['<STR_LIT>']<EOL>agent_os = default_user_agents['<STR_LIT>'].get(os, None)<EOL><DEDENT>if "<STR_LIT>" in settings:<EOL><INDENT>agent_browser = settings['<STR_LIT>']<EOL><DEDENT>if "<STR_LIT>" in settings:<EOL><INDENT>agent_os = settings['<STR_LIT>']<EOL><DEDENT>if not agent:<EOL><INDENT>if agent_browser and agent_os:<EOL><INDENT>agent = agent_browser.format(agent_os)<EOL><DEDENT><DEDENT>self.user_agent = agent<EOL>self._text_maker = None<EOL>"""<STR_LIT>"""<EOL>if settings.get('<STR_LIT>'):<EOL><INDENT>self._set_html2text(settings['<STR_LIT>'])<EOL><DEDENT>self.html_parser = settings.get('<STR_LIT>', "<STR_LIT>")<EOL>"""<STR_LIT>"""<EOL>
Initialize object

:param settings: Settings for instance (default: None)
:type settings: dict | None
:rtype: None