Enigma2 plugin to to play various online streams (mostly Latvian).

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