def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None, entry_protocol='m3u8', preference=None, m3u8_id=None, note=None, errnote=None, fatal=True, live=False, data=None, headers={}, query={}):
    res = self._download_webpage_handle(m3u8_url, video_id, note=(note or 'Downloading m3u8 information'), errnote=(errnote or 'Failed to download m3u8 information'), fatal=fatal, data=data, headers=headers, query=query)
    if (res is False):
        return []
    (m3u8_doc, urlh) = res
    m3u8_url = urlh.geturl()
    return self._parse_m3u8_formats(m3u8_doc, m3u8_url, ext=ext, entry_protocol=entry_protocol, preference=preference, m3u8_id=m3u8_id, live=live)
def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None, entry_protocol='m3u8', preference=None, m3u8_id=None, note=None, errnote=None, fatal=True, live=False, data=None, headers={}, query={}):
    res = self._download_webpage_handle(m3u8_url, video_id, note=(note or 'Downloading m3u8 information'), errnote=(errnote or 'Failed to download m3u8 information'), fatal=fatal, data=data, headers=headers, query=query)
    if (res is False):
        return []
    (m3u8_doc, urlh) = res
    m3u8_url = urlh.geturl()
    return self._parse_m3u8_formats(m3u8_doc, m3u8_url, ext=ext, entry_protocol=entry_protocol, preference=preference, m3u8_id=m3u8_id, live=live)