nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: streamlink/streamlink
Pull request #803 (2017-04-16 17:30:37)

A plugin for teamliquid.net
Here's the plugin I wrote for teamliquid.net (w/ some help from https://github.com/back-to).

It works with both afreecaTV and twitch.tv streams embedded on teamliquid.net (which covers all streams on teamliquid.net afaict).


Patch:
diff --git a/src/streamlink/plugins/teamliquid.py b/src/streamlink/plugins/teamliquid.py
new file mode 100755
index 00000000..66d9f11c
--- /dev/null
+++ b/src/streamlink/plugins/teamliquid.py
@@ -0,0 +1,26 @@
+import re
+
+from streamlink.plugin import Plugin
+from streamlink.plugin.api import http
+
+
+_url_re = re.compile(r'''https?://(?:www\.)?teamliquid\.net/video/streams/''')
+
+
+class Teamliquid(Plugin):
+    @classmethod
+    def can_handle_url(cls, url):
+        return _url_re.match(url)
+
+    def _get_streams(self):
+        res = http.get(self.url)     
+       
+        stream_address_re = re.compile(r'''href\s*=\s*"([^"]+)"\s*>\s*View on''')
+
+        stream_url_match = stream_address_re.search(res.text)
+        if stream_url_match:
+            stream_url = stream_url_match.group(1)
+            self.logger.info("Attempting to play streams from {0}", stream_url)
+            return self.session.streams(stream_url)
+            
+__plugin__ = Teamliquid


Test patch:
diff --git a/tests/test_plugin_teamliquid.py b/tests/test_plugin_teamliquid.py
new file mode 100644
index 00000000..c2ea01bb
--- /dev/null
+++ b/tests/test_plugin_teamliquid.py
@@ -0,0 +1,19 @@
+import unittest
+
+from streamlink.plugins.teamliquid import Teamliquid
+
+
+class TestPluginTeamliquid(unittest.TestCase):
+    def test_can_handle_url(self):
+        # should match
+        self.assertTrue(Teamliquid.can_handle_url("http://www.teamliquid.net/video/streams/Classic%20BW%20VODs"))
+        self.assertTrue(Teamliquid.can_handle_url("http://teamliquid.net/video/streams/iwl-fuNny"))
+        self.assertTrue(Teamliquid.can_handle_url("http://www.teamliquid.net/video/streams/OGamingTV%20SC2"))
+        self.assertTrue(Teamliquid.can_handle_url("http://www.teamliquid.net/video/streams/Check"))
+
+        # shouldn't match
+        self.assertFalse(Teamliquid.can_handle_url("http://www.teamliquid.net/Classic%20BW%20VODs"))
+        self.assertFalse(Teamliquid.can_handle_url("http://www.teamliquid.net/video/Check"))
+        self.assertFalse(Teamliquid.can_handle_url("http://www.teamliquid.com/video/streams/Check"))
+        self.assertFalse(Teamliquid.can_handle_url("http://www.teamliquid.net/video/stream/Check"))
+
Repository: streamlink/streamlink
Pull request #842 (2017-04-25 20:04:04)

[cyro] New plugin for embeded streams from cyro.se
Fixed streamlink/streamlink#721


Patch:
diff --git a/docs/plugin_matrix.rst b/docs/plugin_matrix.rst
index e9f00af2..22b2c1bc 100644
--- a/docs/plugin_matrix.rst
+++ b/docs/plugin_matrix.rst
@@ -65,6 +65,7 @@ cinergroup          - showtv.com.tr      Yes   No
 connectcast         connectcast.tv       Yes   Yes
 crunchyroll         crunchyroll.com      --    Yes
 cybergame           cybergame.tv         Yes   Yes
+cyro                cyro.se              --    Yes
 dailymotion         dailymotion.com      Yes   Yes
 daisuki             daisuki.net          No    Yes
 deutschewelle       dw.com               Yes   No
diff --git a/src/streamlink/plugins/cyro.py b/src/streamlink/plugins/cyro.py
new file mode 100644
index 00000000..7df1cfaa
--- /dev/null
+++ b/src/streamlink/plugins/cyro.py
@@ -0,0 +1,32 @@
+import re
+
+from streamlink.plugin import Plugin
+from streamlink.plugin.api import http
+
+
+_url_re = re.compile(r'''https?://cyro\.se/watch/''')
+_embed_re = re.compile(r'''<iframe.+src="([^"]+)"''')
+
+
+class Cyro(Plugin):
+    @classmethod
+    def can_handle_url(cls, url):
+        return _url_re.match(url)
+
+    def _get_streams(self):
+        res = http.get(self.url)
+        match = _embed_re.search(res.text)
+        if match:
+            iframe_url = "https://cyro.se{0}".format(match.group(1))
+            res = http.get(iframe_url)
+            match = _embed_re.search(res.text)
+            if match:
+                iframe_url = "https://cyro.se{0}".format(match.group(1))
+                res = http.get(iframe_url)
+                match = _embed_re.search(res.text)
+                if match:
+                    url = match.group(1)
+                    return self.session.streams(url)
+
+
+__plugin__ = Cyro


Test patch:
diff --git a/tests/test_plugin_cyro.py b/tests/test_plugin_cyro.py
new file mode 100644
index 00000000..c75d2775
--- /dev/null
+++ b/tests/test_plugin_cyro.py
@@ -0,0 +1,16 @@
+import unittest
+
+from streamlink.plugins.cyro import Cyro
+
+
+class TestPluginCyro(unittest.TestCase):
+    def test_can_handle_url(self):
+        # should match
+        self.assertTrue(Cyro.can_handle_url("http://cyro.se/watch/foobar"))
+        self.assertTrue(Cyro.can_handle_url("http://cyro.se/watch/foobar/s1/e4"))
+        self.assertTrue(Cyro.can_handle_url("https://cyro.se/watch/barfoo"))
+        self.assertTrue(Cyro.can_handle_url("https://cyro.se/watch/foobar/s1/e4"))
+
+        # shouldn't match
+        self.assertFalse(Cyro.can_handle_url("http://cyro.se"))
+        self.assertFalse(Cyro.can_handle_url("https://cyro.se"))
Repository: streamlink/streamlink
Pull request #1018 (2017-06-19 07:48:58)

plugins.canlitv: simplified and fixed the m3u8 regex
On some pages there is a space before the `:`, after `file`. Added a few tests for the regex too. 


Patch:
diff --git a/src/streamlink/plugins/canlitv.py b/src/streamlink/plugins/canlitv.py
index 4ff9877b..64c73fa3 100644
--- a/src/streamlink/plugins/canlitv.py
+++ b/src/streamlink/plugins/canlitv.py
@@ -8,7 +8,7 @@ from streamlink.stream import HLSStream
 EMBED_URL_1 = "http://www.canlitv.life/kanallar.php?kanal={0}"
 EMBED_URL_2 = "http://www.ecanlitvizle.net/embed.php?kanal={0}"
 
-_m3u8_re = re.compile(r"file:(?:\s+)?(?:\'|\")(?P<url>[^\"']+)(?:\'|\")")
+_m3u8_re = re.compile(r"""file\s*:\s*['"](?P<url>[^"']+)['"]""")
 _url_re = re.compile(r"""http(s)?://(?:www\.)?(?P<domain>
     canlitv\.(com|life)
     |


Test patch:
diff --git a/tests/test_plugin_canlitv.py b/tests/test_plugin_canlitv.py
index 30c27155..0c5c69c4 100644
--- a/tests/test_plugin_canlitv.py
+++ b/tests/test_plugin_canlitv.py
@@ -1,9 +1,23 @@
 import unittest
 
-from streamlink.plugins.canlitv import Canlitv
+from streamlink.plugins.canlitv import Canlitv, _m3u8_re
 
 
 class TestPluginCanlitv(unittest.TestCase):
+    def test_m3u8_re(self):
+        def test_re(text):
+            m = _m3u8_re.search(text)
+            self.assertTrue(m and len(m.group("url")) > 0)
+
+        test_re('file: "test" ')
+        test_re('file:"test"')
+        test_re('file : "test"')
+        test_re('file   :   "test"  ')
+        test_re("file: 'test'")
+        test_re("file :'test'")
+        test_re("file : 'test'")
+        test_re("file   :   'test'")
+
     def test_can_handle_url(self):
         # should match
         self.assertTrue(Canlitv.can_handle_url("http://www.canlitv.com/channel"))
Repository: streamlink/streamlink
Pull request #1075 (2017-07-07 16:29:46)

[arconai] Fixed plugin for new website
Fixed streamlink/streamlink#1067
Fixed streamlink/streamlink#1073


Patch:
diff --git a/src/streamlink/plugins/arconai.py b/src/streamlink/plugins/arconai.py
index bd6cff20..7a0ee04b 100644
--- a/src/streamlink/plugins/arconai.py
+++ b/src/streamlink/plugins/arconai.py
@@ -1,14 +1,13 @@
 import re
 
 from streamlink.plugin import Plugin
-from streamlink.plugin.api import http, validate
-from streamlink.plugin.api.utils import parse_json
+from streamlink.plugin.api import http
+from streamlink.plugin.api import useragents
 from streamlink.stream import HLSStream
 
-_url_re = re.compile(r"https://www.arconaitv.me/([^/]+)/")
+_url_re = re.compile(r'''https?://(www\.)?arconaitv\.me/stream\.php\?id=\d+''')
+_playlist_re = re.compile(r'''source\ssrc=["'](?P<url>[^"']+)["']''')
 
-SOURCES_RE = re.compile(r" data-item='([^']+)' ")
-USER_AGENT = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36"
 
 class ArconaiTv(Plugin):
     @classmethod
@@ -16,19 +15,21 @@ class ArconaiTv(Plugin):
         return _url_re.match(url)
 
     def _get_streams(self):
-        page = http.get(self.url)
-        match = SOURCES_RE.search(page.text)
-        if match is None:
-            return
+        headers = {
+            'User-Agent': useragents.CHROME,
+            'Referer': self.url
+        }
 
-        sources = parse_json(match.group(1))
-        if "sources" not in sources or not isinstance(sources["sources"], list):
+        res = http.get(self.url, headers=headers)
+
+        match = _playlist_re.search(res.text)
+        if match is None:
             return
 
-        for source in sources["sources"]:
-            if "src" not in source or not source["src"].endswith(".m3u8"):
-                continue
+        url = match.group('url')
 
-            yield "live", HLSStream(self.session, source["src"], headers={"User-Agent": USER_AGENT})
+        if url:
+            self.logger.debug('HLS URL: {0}'.format(url))
+            yield 'live', HLSStream(self.session, url, headers=headers)
 
 __plugin__ = ArconaiTv


Test patch:
diff --git a/tests/test_plugin_arconai.py b/tests/test_plugin_arconai.py
new file mode 100644
index 00000000..d1a462f7
--- /dev/null
+++ b/tests/test_plugin_arconai.py
@@ -0,0 +1,14 @@
+import unittest
+
+from streamlink.plugins.arconai import ArconaiTv
+
+
+class TestPluginArconaiTv(unittest.TestCase):
+    def test_can_handle_url(self):
+        # should match
+        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.me/stream.php?id=1'))
+        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.me/stream.php?id=23'))
+        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.me/stream.php?id=440'))
+
+        # shouldn't match
+        self.assertFalse(ArconaiTv.can_handle_url('http://arconaitv.me/'))
Repository: streamlink/streamlink
Pull request #1153 (2017-08-08 12:29:14)

[liveme] url regex update
Fixed streamlink/streamlink#1149

codecov[bot]: # [Codecov](https://codecov.io/gh/streamlink/streamlink/pull/1153?src=pr&el=h1) Report
> Merging [#1153](https://codecov.io/gh/streamlink/streamlink/pull/1153?src=pr&el=desc) into [master](https://codecov.io/gh/streamlink/streamlink/commit/f69e7cdf015d93e458ebb0b0cd3e4b7c6d46680e?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `100%`.


```diff
@@            Coverage Diff             @@
##           master    #1153      +/-   ##
==========================================
+ Coverage   47.44%   47.46%   +0.01%     
==========================================
  Files          96       97       +1     
  Lines        7078     7111      +33     
==========================================
+ Hits         3358     3375      +17     
- Misses       3720     3736      +16
```

gravyboat: Sorry @back-to this slipped past me, can you rebase?

Patch:
diff --git a/src/streamlink/plugins/liveme.py b/src/streamlink/plugins/liveme.py
index 3a0cbf85..b96a52bc 100644
--- a/src/streamlink/plugins/liveme.py
+++ b/src/streamlink/plugins/liveme.py
@@ -10,7 +10,7 @@ from streamlink.stream import HTTPStream
 
 
 class LiveMe(Plugin):
-    url_re = re.compile(r"https?://(www.)?liveme.com/media/play/(.*)")
+    url_re = re.compile(r"https?://(www.)?liveme\.com/live\.html\?videoid=(\d+)")
     api_url = "http://live.ksmobile.net/live/queryinfo?userid=1&videoid={id}"
     api_schema = validate.Schema(validate.all({
         "status": "200",


Test patch:
diff --git a/tests/test_plugin_liveme.py b/tests/test_plugin_liveme.py
new file mode 100644
index 00000000..e39b2680
--- /dev/null
+++ b/tests/test_plugin_liveme.py
@@ -0,0 +1,15 @@
+import unittest
+
+from streamlink.plugins.liveme import LiveMe
+
+
+class TestPluginLiveMe(unittest.TestCase):
+    def test_can_handle_url(self):
+        # should match
+        self.assertTrue(LiveMe.can_handle_url('http://www.liveme.com/live.html?videoid=12312312312312312312'))
+        self.assertTrue(LiveMe.can_handle_url('http://www.liveme.com/live.html?videoid=23123123123123123123&countryCode=undefined'))
+
+        # shouldn't match
+        self.assertFalse(LiveMe.can_handle_url('http://www.liveme.com/'))
+        self.assertFalse(LiveMe.can_handle_url('http://www.liveme.com/explore.html'))
+        self.assertFalse(LiveMe.can_handle_url('http://www.liveme.com/media/play'))
Repository: streamlink/streamlink
Pull request #1200 (2017-09-04 13:59:53)

plugins.arconaitv: fix arconaitv to new url
Just updates ArconaiTv to support the new url.


Patch:
diff --git a/src/streamlink/plugins/arconai.py b/src/streamlink/plugins/arconai.py
index 7a0ee04b..004daa6f 100644
--- a/src/streamlink/plugins/arconai.py
+++ b/src/streamlink/plugins/arconai.py
@@ -5,7 +5,7 @@ from streamlink.plugin.api import http
 from streamlink.plugin.api import useragents
 from streamlink.stream import HLSStream
 
-_url_re = re.compile(r'''https?://(www\.)?arconaitv\.me/stream\.php\?id=\d+''')
+_url_re = re.compile(r'''https?://(www\.)?arconaitv\.co/stream\.php\?id=\d+''')
 _playlist_re = re.compile(r'''source\ssrc=["'](?P<url>[^"']+)["']''')
 
 


Test patch:
diff --git a/tests/test_plugin_arconai.py b/tests/test_plugin_arconai.py
index d1a462f7..0879351a 100644
--- a/tests/test_plugin_arconai.py
+++ b/tests/test_plugin_arconai.py
@@ -6,9 +6,9 @@ from streamlink.plugins.arconai import ArconaiTv
 class TestPluginArconaiTv(unittest.TestCase):
     def test_can_handle_url(self):
         # should match
-        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.me/stream.php?id=1'))
-        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.me/stream.php?id=23'))
-        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.me/stream.php?id=440'))
+        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.co/stream.php?id=6'))
+        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.co/stream.php?id=24'))
+        self.assertTrue(ArconaiTv.can_handle_url('http://arconaitv.co/stream.php?id=115'))
 
         # shouldn't match
-        self.assertFalse(ArconaiTv.can_handle_url('http://arconaitv.me/'))
+        self.assertFalse(ArconaiTv.can_handle_url('http://arconaitv.co/'))
Repository: streamlink/streamlink
Pull request #1526 (2018-03-02 19:56:57)

[TVRPlus] Fix for hls_re and use headers for HLSStream
`best` and `worst` won't work, the source is **404**

`streamlink "http://www.tvrplus.ro/live-tvr-international" 1200k`

```
360k (worst) - broken 404
1200k - works
2500k (best) - broken 404
```

Closes https://github.com/streamlink/streamlink/issues/1435


Patch:
diff --git a/src/streamlink/plugins/tvrplus.py b/src/streamlink/plugins/tvrplus.py
index 72e7d0a8..7784666d 100644
--- a/src/streamlink/plugins/tvrplus.py
+++ b/src/streamlink/plugins/tvrplus.py
@@ -2,18 +2,19 @@ import re
 
 from streamlink.plugin import Plugin
 from streamlink.plugin.api import http
+from streamlink.plugin.api import useragents
 from streamlink.plugin.api import validate
 from streamlink.stream import HLSStream
 
 
 class TVRPlus(Plugin):
-    url_re = re.compile(r"https?://(?:www\.)tvrplus.ro/live-")
-    hls_file_re = re.compile(r"file: (?P<q>[\"'])(?P<url>http.+?m3u8.*?)(?P=q)")
+    url_re = re.compile(r"https?://(?:www\.)?tvrplus\.ro/live-")
+    hls_file_re = re.compile(r"""["'](?P<url>[^"']+\.m3u8(?:[^"']+)?)["']""")
 
     stream_schema = validate.Schema(
         validate.all(
-            validate.transform(hls_file_re.search),
-            validate.any(None, validate.get("url"))
+            validate.transform(hls_file_re.findall),
+            validate.any(None, [validate.text])
         ),
     )
 
@@ -22,9 +23,17 @@ class TVRPlus(Plugin):
         return cls.url_re.match(url) is not None
 
     def _get_streams(self):
+        headers = {
+            "User-Agent": useragents.FIREFOX,
+            "Referer": self.url
+        }
         stream_url = self.stream_schema.validate(http.get(self.url).text)
         if stream_url:
-            return HLSStream.parse_variant_playlist(self.session, stream_url)
+            stream_url = list(set(stream_url))
+            for url in stream_url:
+                self.logger.debug("URL={0}".format(url))
+                for s in HLSStream.parse_variant_playlist(self.session, url, headers=headers).items():
+                    yield s
 
 
 __plugin__ = TVRPlus


Test patch:
diff --git a/tests/test_plugin_tvrplus.py b/tests/test_plugin_tvrplus.py
new file mode 100644
index 00000000..8be192a4
--- /dev/null
+++ b/tests/test_plugin_tvrplus.py
@@ -0,0 +1,21 @@
+import unittest
+
+from streamlink.plugins.tvrplus import TVRPlus
+
+
+class TestPluginTVRPlus(unittest.TestCase):
+    def test_can_handle_url(self):
+        should_match = [
+            "http://tvrplus.ro/live-tvr-1",
+            "http://www.tvrplus.ro/live-tvr-1",
+            "http://www.tvrplus.ro/live-tvr-3",
+            "http://www.tvrplus.ro/live-tvr-international",
+        ]
+        for url in should_match:
+            self.assertTrue(TVRPlus.can_handle_url(url))
+
+        should_not_match = [
+            "http://www.tvrplus.ro/",
+        ]
+        for url in should_not_match:
+            self.assertFalse(TVRPlus.can_handle_url(url))
Repository: streamlink/streamlink
Pull request #1560 (2018-03-18 18:11:30)

plugins.live_russia_tv New Plugin implementation for live.russia.tv
Adds support for Russian TV channels from https://live.russia.tv/
E.g.
$ streamlink https://live.russia.tv/index/index/channel_id/4 best


Patch:
diff --git a/src/streamlink/plugins/live_russia_tv.py b/src/streamlink/plugins/live_russia_tv.py
new file mode 100644
index 00000000..d28d314c
--- /dev/null
+++ b/src/streamlink/plugins/live_russia_tv.py
@@ -0,0 +1,33 @@
+import re
+from streamlink.plugin import Plugin
+from streamlink.plugin.api import http
+from streamlink.stream import HLSStream
+
+class LiveRussia(Plugin):
+    url_re = re.compile(r"https?://(?:www.)?live.russia.tv/index/index/channel_id/")
+    iframe_re = re.compile(r"""<iframe[^>]*src=["']([^'"]+)["'][^>]*>""")
+    stream_re = re.compile(r"""window.pl.data.*m3u8":"(.*)"}.*};""")
+
+    @classmethod
+    def can_handle_url(cls, url):
+        return cls.url_re.match(url) is not None
+
+    def _get_streams(self):
+        res = http.get(self.url)
+        iframe_result = re.search(self.iframe_re, res.text)
+
+        if not iframe_result:
+            self.logger.error("The requested content is unavailable.")
+            return
+
+        res = http.get(iframe_result.group(1))
+        stream_url_result = re.search(self.stream_re, res.text)
+
+        if not stream_url_result:
+            self.logger.error("The requested content is unavailable.")
+            return
+
+        return HLSStream.parse_variant_playlist(self.session, stream_url_result.group(1))
+
+
+__plugin__ = LiveRussia
\ No newline at end of file


Test patch:
diff --git a/tests/test_plugin_liverussiatv.py b/tests/test_plugin_liverussiatv.py
new file mode 100644
index 00000000..9310f999
--- /dev/null
+++ b/tests/test_plugin_liverussiatv.py
@@ -0,0 +1,13 @@
+import unittest
+
+from streamlink.plugins.live_russia_tv import LiveRussia
+
+class TestPluginLiveRussiaTv(unittest.TestCase):
+    def test_can_handle_url(self):
+        # should match
+        self.assertTrue(LiveRussia.can_handle_url('https://live.russia.tv/index/index/channel_id/1'))
+        self.assertTrue(LiveRussia.can_handle_url('https://live.russia.tv/index/index/channel_id/199'))
+
+        # shouldn't match
+        self.assertFalse(LiveRussia.can_handle_url('https://live.russia.tv/'))
+        self.assertFalse(LiveRussia.can_handle_url('http://live.russia.tv/wrongURI'))
\ No newline at end of file
Repository: streamlink/streamlink
Pull request #1564 (2018-03-19 14:37:27)

[playtv] Add support for international Play TV website 
See https://github.com/streamlink/streamlink/pull/1533.


Patch:
diff --git a/docs/plugin_matrix.rst b/docs/plugin_matrix.rst
index 612fbd4a..ec982235 100644
--- a/docs/plugin_matrix.rst
+++ b/docs/plugin_matrix.rst
@@ -142,7 +142,8 @@ pandatv             panda.tv             Yes   ?
 periscope           periscope.tv         Yes   Yes   Replay/VOD is supported.
 picarto             picarto.tv           Yes   Yes
 pixiv               sketch.pixiv.net     Yes   --
-playtv              playtv.fr            Yes   --    Streams may be geo-restricted to France.
+playtv              - playtv.fr          Yes   --    Streams may be geo-restricted to France.
+                    - play.tv
 pluzz               - france.tv          Yes   Yes   Streams may be geo-restricted to France, Andorra and Monaco.
                     - ludo.fr
                     - zouzous.fr
diff --git a/src/streamlink/plugins/playtv.py b/src/streamlink/plugins/playtv.py
index d046d9aa..9a1a8ee2 100644
--- a/src/streamlink/plugins/playtv.py
+++ b/src/streamlink/plugins/playtv.py
@@ -9,7 +9,7 @@ class PlayTV(Plugin):
     FORMATS_URL = 'http://playtv.fr/player/initialize/{0}/'
     API_URL = 'http://playtv.fr/player/play/{0}/?format={1}&language={2}&bitrate={3}'
 
-    _url_re = re.compile(r'http://playtv\.fr/television/(?P<channel>[^/]+)/?')
+    _url_re = re.compile(r'http://(?:playtv\.fr/television|play\.tv/live-tv/\d+)/(?P<channel>[^/]+)/?')
 
     _formats_schema = validate.Schema({
         'streams': validate.any(


Test patch:
diff --git a/tests/test_plugin_playtv.py b/tests/test_plugin_playtv.py
index 06e089e1..73c5411c 100644
--- a/tests/test_plugin_playtv.py
+++ b/tests/test_plugin_playtv.py
@@ -10,9 +10,14 @@ class TestPluginPlayTV(unittest.TestCase):
         self.assertTrue(PlayTV.can_handle_url("http://playtv.fr/television/arte/"))
         self.assertTrue(PlayTV.can_handle_url("http://playtv.fr/television/tv5-monde"))
         self.assertTrue(PlayTV.can_handle_url("http://playtv.fr/television/france-24-english/"))
+        self.assertTrue(PlayTV.can_handle_url("http://play.tv/live-tv/9/arte"))
+        self.assertTrue(PlayTV.can_handle_url("http://play.tv/live-tv/9/arte/"))
+        self.assertTrue(PlayTV.can_handle_url("http://play.tv/live-tv/21/tv5-monde"))
+        self.assertTrue(PlayTV.can_handle_url("http://play.tv/live-tv/50/france-24-english/"))
 
         # shouldn't match
         self.assertFalse(PlayTV.can_handle_url("http://playtv.fr/television/"))
         self.assertFalse(PlayTV.can_handle_url("http://playtv.fr/replay-tv/"))
+        self.assertFalse(PlayTV.can_handle_url("http://play.tv/live-tv/"))
         self.assertFalse(PlayTV.can_handle_url("http://tvcatchup.com/"))
         self.assertFalse(PlayTV.can_handle_url("http://youtube.com/"))