def __init__(self, lectures, access_token=None):
    super(InternUdemyLecture, self).__init__()
    self._access_token = access_token
    self._info = lectures
    self._lecture_id = self._info['lectures_id']
    self._lecture_title = self._info['lecture_title']
    self._lecture_index = self._info['lecture_index']
    self._subtitles_count = self._info.get('subtitle_count', 0)
    self._sources_count = self._info.get('sources_count', 0)
    self._assets_count = self._info.get('assets_count', 0)
    self._extension = self._info.get('extension')
    self._html_content = self._info.get('html_content')
    self._duration = self._info.get('duration')
    if self._duration:
        duration = int(self._duration)
        (mins, secs) = divmod(duration, 60)
        (hours, mins) = divmod(mins, 60)
        if (hours == 0):
            self._duration = ('%02d:%02d' % (mins, secs))
        else:
            self._duration = ('%02d:%02d:%02d' % (hours, mins, secs))
def __init__(self, lectures, access_token=None):
    super(InternUdemyLecture, self).__init__()
    self._access_token = access_token
    self._info = lectures
    self._lecture_id = self._info['lectures_id']
    self._lecture_title = self._info['lecture_title']
    self._lecture_index = self._info['lecture_index']
    self._subtitles_count = self._info.get('subtitle_count', 0)
    self._sources_count = self._info.get('sources_count', 0)
    self._assets_count = self._info.get('assets_count', 0)
    self._extension = self._info.get('extension')
    self._html_content = self._info.get('html_content')
    self._duration = self._info.get('duration')
    if self._duration:
        duration = int(self._duration)
        (mins, secs) = divmod(duration, 60)
        (hours, mins) = divmod(mins, 60)
        if (hours == 0):
            self._duration = ('%02d:%02d' % (mins, secs))
        else:
            self._duration = ('%02d:%02d:%02d' % (hours, mins, secs))