def _browser_init(self):
        """
        Init the browsing instance if not setup

        :rtype: None
        """
        if self.session:
            return

        self.session = requests.Session()
        headers = {}

        if self.user_agent:
            headers['User-agent'] = self.user_agent
        self.session.headers.update(headers)

        if self._auth_method in [None, "", "HTTPBasicAuth"]:
            if self._auth_username is not None:
                self.session.auth = (self._auth_username, self._auth_password)
def _browser_init ( self ) : if self . session : return self . session = requests . Session ( ) headers = { } if self . user_agent : headers [ 'User-agent' ] = self . user_agent self . session . headers . update ( headers ) if self . _auth_method in [ None , "" , "HTTPBasicAuth" ] : if self . _auth_username is not None : self . session . auth = ( self . _auth_username , self . _auth_password )
Init the browsing instance if not setup

        :rtype: None