예제 #1
0
 def test_vod_0(self):
     expected = 'http://vod.ak.hls.ttvnw.net/v1/AUTH_system/vods_1ddc/hutch_12752035712_193039230/chunked/index-dvr.m3u8'
     url = m3u8_to_dict(self.vod)['Source']
     self.assertEqual(url, expected)
예제 #2
0
 def test_restr_0_2(self):
     expected = 'http://video16.prg01.hls.twitch.tv/hls18/ongamenet_9656195424_98434331/medium/index-live.m3u8?token=id=6125541036366455728,bid=9656195424,exp=1401014215,node=video16-1.prg01.hls.justin.tv,nname=video16.prg01,fmt=medium&sig=f1f4f1ee9f9cf47c826ddc95ef1f60d9a2f6a2ce'
     with self.assertRaises(KeyError):
         m3u8_to_dict(self.restricted)['Source']
     url = m3u8_to_dict(self.restricted)['Medium']
     self.assertEqual(url, expected)
예제 #3
0
 def test_restr_3(self):
     expected = 'http://video16.prg01.hls.twitch.tv/hls18/ongamenet_9656195424_98434331/low/index-live.m3u8?token=id=6125541036366455728,bid=9656195424,exp=1401014215,node=video16-1.prg01.hls.justin.tv,nname=video16.prg01,fmt=low&sig=754158e9e20ce4fcae5614a1f07d8b37dbc3e1a2'
     url = m3u8_to_dict(self.restricted)['Low']
     self.assertEqual(url, expected)
예제 #4
0
 def test_live_0(self):
     expected = 'http://video2.prg01.hls.twitch.tv/hls106/riotgamesoceania_9652805392_98328050/chunked/index-live.m3u8?token=id=7828074928424501897,bid=9652805392,exp=1401005240,node=video2-1.prg01.hls.justin.tv,nname=video2.prg01,fmt=chunked&sig=b9cd78d1ae4e9b08da21cc0fec718b2fe506af92'
     url = m3u8_to_dict(self.live)['Source']
     self.assertEqual(url, expected)
예제 #5
0
 def test_live_2(self):
     expected = 'http://video2.prg01.hls.twitch.tv/hls106/riotgamesoceania_9652805392_98328050/medium/index-live.m3u8?token=id=7828074928424501897,bid=9652805392,exp=1401005240,node=video2-1.prg01.hls.justin.tv,nname=video2.prg01,fmt=medium&sig=6c93f95701cd27818f5cc45da2f1a7abf23a1d1a'
     url = m3u8_to_dict(self.live)['Medium']
     self.assertEqual(url, expected)
예제 #6
0
 def test_vod_0(self):
     expected = 'http://vod.ak.hls.ttvnw.net/v1/AUTH_system/vods_1ddc/hutch_12752035712_193039230/chunked/index-dvr.m3u8'
     url = m3u8_to_dict(self.vod)['Source']
     self.assertEqual(url, expected)
예제 #7
0
 def test_restr_3(self):
     expected = 'http://video16.prg01.hls.twitch.tv/hls18/ongamenet_9656195424_98434331/low/index-live.m3u8?token=id=6125541036366455728,bid=9656195424,exp=1401014215,node=video16-1.prg01.hls.justin.tv,nname=video16.prg01,fmt=low&sig=754158e9e20ce4fcae5614a1f07d8b37dbc3e1a2'
     url = m3u8_to_dict(self.restricted)['Low']
     self.assertEqual(url, expected)
예제 #8
0
 def test_restr_0_2(self):
     expected = 'http://video16.prg01.hls.twitch.tv/hls18/ongamenet_9656195424_98434331/medium/index-live.m3u8?token=id=6125541036366455728,bid=9656195424,exp=1401014215,node=video16-1.prg01.hls.justin.tv,nname=video16.prg01,fmt=medium&sig=f1f4f1ee9f9cf47c826ddc95ef1f60d9a2f6a2ce'
     with self.assertRaises(KeyError):
         m3u8_to_dict(self.restricted)['Source']
     url = m3u8_to_dict(self.restricted)['Medium']
     self.assertEqual(url, expected)
예제 #9
0
 def test_live_2(self):
     expected = 'http://video2.prg01.hls.twitch.tv/hls106/riotgamesoceania_9652805392_98328050/medium/index-live.m3u8?token=id=7828074928424501897,bid=9652805392,exp=1401005240,node=video2-1.prg01.hls.justin.tv,nname=video2.prg01,fmt=medium&sig=6c93f95701cd27818f5cc45da2f1a7abf23a1d1a'
     url = m3u8_to_dict(self.live)['Medium']
     self.assertEqual(url, expected)
예제 #10
0
 def test_live_0(self):
     expected = 'http://video2.prg01.hls.twitch.tv/hls106/riotgamesoceania_9652805392_98328050/chunked/index-live.m3u8?token=id=7828074928424501897,bid=9652805392,exp=1401005240,node=video2-1.prg01.hls.justin.tv,nname=video2.prg01,fmt=chunked&sig=b9cd78d1ae4e9b08da21cc0fec718b2fe506af92'
     url = m3u8_to_dict(self.live)['Source']
     self.assertEqual(url, expected)