def _fetch_course(self):
    auth = {}
    if (not self._cookies):
        auth = self._login(username=self._username, password=self._password)
    if ((not auth) and self._cookies):
        auth = self._login(cookies=self._cookies)
    if (auth.get('login') == 'successful'):
        logger.info(msg='Logged in successfully.', new_line=True)
        logger.info(msg='Fetching all enrolled course(s) url(s)..')
        self._courses = self._extract_subscribed_courses()
        time.sleep(1)
        logger.success(msg='Fetching all enrolled course(s) url(s).. ')
        self._logout()
    if (auth.get('login') == 'failed'):
        logger.error(msg='Failed to login ..\n')
        sys.exit(0)
def _fetch_course(self):
    auth = {}
    if (not self._cookies):
        auth = self._login(username=self._username, password=self._password)
    if ((not auth) and self._cookies):
        auth = self._login(cookies=self._cookies)
    if (auth.get('login') == 'successful'):
        logger.info(msg='Logged in successfully.', new_line=True)
        logger.info(msg='Fetching all enrolled course(s) url(s)..')
        self._courses = self._extract_subscribed_courses()
        time.sleep(1)
        logger.success(msg='Fetching all enrolled course(s) url(s).. ')
        self._logout()
    if (auth.get('login') == 'failed'):
        logger.error(msg='Failed to login ..\n')
        sys.exit(0)