import m3u8 url = "http://s.ltv.lv:1935/vod/mp4:_definst_/d/f/8aaa2675.mp4/playlist.m3u8?safwerwfasendtime=1465773436&safwerwfasstarttime=1465764577&safwerwfashash=LjQlOFFfDOHdXXMncuzhi_XfDLNOJ764NSLM_vS9Xqw=" url = "http://player.tvnet.lv/stream/amlst:60441/playlist.m3u8" m3u8_obj = m3u8.load(url) print m3u8_obj.segments print m3u8_obj.target_duration