mirror of
https://github.com/streamlink/streamlink
synced 2024-11-01 01:19:33 +01:00
e1b398bc49
> Telewizja Polska S.A. (TVP S.A., or Polish Television) is a public broadcasting corporation, > the only public TV broadcaster in the territory of the Republic of Poland. > https://en.wikipedia.org/wiki/Telewizja_Polska http://tvpstream.vod.tvp.pl http://tvpstream.vod.tvp.pl/?channel_id=1455 ``` [cli][info] Found matching plugin tvp for URL http://tvpstream.vod.tvp.pl/?channel_id=1455 [cli][info] Available streams: none_101k, 288p_228k (worst), 288p_578k, 288p_1119k, 288p_1797k, 576p_2433k, 576p_3811k (best) [cli][info] Opening stream: 576p_3811k (hls) ```
21 lines
573 B
Python
21 lines
573 B
Python
import unittest
|
|
|
|
from streamlink.plugins.tvp import TVP
|
|
|
|
|
|
class TestPluginTVP(unittest.TestCase):
|
|
def test_can_handle_url(self):
|
|
should_match = [
|
|
'http://tvpstream.vod.tvp.pl/?channel_id=14327511',
|
|
'http://tvpstream.vod.tvp.pl/?channel_id=1455',
|
|
]
|
|
for url in should_match:
|
|
self.assertTrue(TVP.can_handle_url(url))
|
|
|
|
should_not_match = [
|
|
'http://tvp.pl/',
|
|
'http://vod.tvp.pl/',
|
|
]
|
|
for url in should_not_match:
|
|
self.assertFalse(TVP.can_handle_url(url))
|