-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtest_liblrt.lt
93 lines (74 loc) · 1.79 KB
/
test_liblrt.lt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import liblrt as lrt
def test1():
print 'getLiveURLs():'
urls = lrt.getLiveURLs()
if not urls:
print 'Failed!'
for url in urls:
print 'Name: ' + url['name']
print 'Now Playing: ' + url['nowPlaying']
print 'URL: ' + url['url']
print 'Type: ' + url['contentType']
print '-------'
def test2():
print "getVideoStreamURL()"
urls = lrt.getLiveURLs()
if not urls:
print 'Failed!'
for url in urls:
u = lrt.getVideoStreamURL(url['url'])
print "url: " + u['url']
print "image: " + u['image']
print '-------'
def test3():
print "test3()"
print lrt.getLatestNews()
def test4():
print "test4()"
print lrt.getVideoStreamURL('http://www.lrt.lt/mediateka/irasas/84760/lrt#wowzaplaystart=695000&wowzaplayduration=187000')
print lrt.getVideoStreamURL('http://www.lrt.lt/mediateka/tiesiogiai/lrt-televizija')
print lrt.getVideoStreamURL('http://www.lrt.lt/vaikams/ikimokyklinukams/25/4984')
def test5():
print "test5()"
print lrt.getTVShowsList()
def test6():
print "test6() Auksinis protas"
print lrt.getTVShowVideos(92)
def test7():
print "test7()"
print lrt.getPopularVideos()
def test8():
print "test8()"
print lrt.getPlaylistsGroups()
def test9():
print "test9()"
print lrt.getPlaylists(1)
def test10():
print "test10()"
print lrt.getPlaylist(1388)
if __name__ == '__main__':
if len(sys.argv) > 1:
n = int(sys.argv[1])
if n == 1:
test1()
elif n == 2:
test2()
elif n == 3:
test3()
elif n == 4:
test4()
elif n == 5:
test5()
elif n == 6:
test6()
elif n == 7:
test7()
elif n == 8:
test8()
elif n == 9:
test9()
elif n == 10:
test10()