Repository: streamlink/streamlink

Issue:
FilmOn.py  No plugin can handle
## Error Report

- [x] This is a bug report and I have read the post guidelines.

### Description

On the homepage of Film On the UK channels are played without problem.
Unfortunately not with Streamlink. Here it fails with the transmitter Channel4 and Channel5

### Expected / actual behavior

I enter the address and there is no picture.

streamlink http://www.filmon.com/tv/channel-4 best

### Reproduction steps / Explicit stream URLs to test

1.https: //www.filmon.com/tv/channel-4
2.https: //www.filmon.com/tv/channel-5

### log output

Not Work with Channel4:
WINDOWS> streamlink http://www.filmon.com/tv/channel-4  best
error: No plugin can handle URL: http://www.filmon.com/tv/channel-4

Work with More4
WINDOWS> streamlink https://www.filmon.com/tv/more4 best
[cli][info] Found matching plugin filmon for URL https://www.filmon.com/tv/more4
[cli][info] Available streams: low (worst), high (best)
[cli][info] Opening stream: high (hls-filmon)
[cli][info] Starting player: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...


### Additional comments, screenshots, etc.

https://i.ibb.co/FDs2QtX/film-on.jpg

Comments:

Patch:
diff --git a/setup.py b/setup.py
index 54007193..2ec570ab 100644
--- a/setup.py
+++ b/setup.py
@@ -13,8 +13,8 @@ deps = [
     'futures;python_version<"3.0"',
     # Require singledispatch on Python <3.4
     'singledispatch;python_version<"3.4"',
-    "requests>=2.2,!=2.12.0,!=2.12.1,!=2.16.0,!=2.16.1,!=2.16.2,!=2.16.3,!=2.16.4,!=2.16.5,!=2.17.1,<3.0",
-    'urllib3[secure]<1.23,>=1.21.1;python_version<"3.0"',
+    "requests>=2.21.0,<3.0",
+    'urllib3[secure]>=1.23;python_version<"3.0"',
     "isodate",
     "websocket-client",
     # Support for SOCKS proxies
diff --git a/src/streamlink/plugins/filmon.py b/src/streamlink/plugins/filmon.py
index ffc0fbe6..1a2e77eb 100644
--- a/src/streamlink/plugins/filmon.py
+++ b/src/streamlink/plugins/filmon.py
@@ -164,7 +164,7 @@ class Filmon(Plugin):
             |
             (?:tv/)channel/(?:export\?)?
             |
-            tv/(?!channel)
+            tv/(?!channel/)
             |
             channel/
             |
diff --git a/src/streamlink_cli/output.py b/src/streamlink_cli/output.py
index 925a802c..976884af 100644
--- a/src/streamlink_cli/output.py
+++ b/src/streamlink_cli/output.py
@@ -207,7 +207,11 @@ class PlayerOutput(Output):
 
     def _open_call(self):
         args = self._create_arguments()
-        log.debug(u"Calling: {0}".format(subprocess.list2cmdline(args)))
+        if is_win32:
+            fargs = args
+        else:
+            fargs = subprocess.list2cmdline(args)
+        log.debug(u"Calling: {0}".format(fargs))
         subprocess.call(args,
                         stdout=self.stdout,
                         stderr=self.stderr)
@@ -216,7 +220,11 @@ class PlayerOutput(Output):
         # Force bufsize=0 on all Python versions to avoid writing the
         # unflushed buffer when closing a broken input pipe
         args = self._create_arguments()
-        log.debug(u"Opening subprocess: {0}".format(subprocess.list2cmdline(args)))
+        if is_win32:
+            fargs = args
+        else:
+            fargs = subprocess.list2cmdline(args)
+        log.debug(u"Opening subprocess: {0}".format(fargs))
         self.player = subprocess.Popen(args,
                                        stdin=self.stdin, bufsize=0,
                                        stdout=self.stdout,


Test patch:
diff --git a/tests/plugins/test_filmon.py b/tests/plugins/test_filmon.py
index a62d407d..ab30fc5d 100644
--- a/tests/plugins/test_filmon.py
+++ b/tests/plugins/test_filmon.py
@@ -10,24 +10,25 @@ class TestPluginFilmon(unittest.TestCase):
             'http://www.filmon.tv/index/popout?channel_id=5510&quality=low',
             'http://www.filmon.tv/tv/channel/export?channel_id=5510&autoPlay=1',
             'http://www.filmon.tv/tv/channel/grandstand-show',
+            'http://www.filmon.tv/tv/channel-4',
             'https://www.filmon.com/tv/bbc-news',
             'https://www.filmon.tv/tv/55',
             'http://www.filmon.tv/vod/view/10250-0-crime-boss',
             'http://www.filmon.tv/group/comedy',
         ]
         for url in should_match:
-            self.assertTrue(Filmon.can_handle_url(url))
+            self.assertTrue(Filmon.can_handle_url(url), url)
 
     def test_can_handle_url_negative(self):
         should_not_match = [
             'https://example.com/index.html',
         ]
         for url in should_not_match:
-            self.assertFalse(Filmon.can_handle_url(url))
+            self.assertFalse(Filmon.can_handle_url(url), url)
 
     def _test_regex(self, url, expected):
         m = Filmon.url_re.match(url)
-        self.assertIsNotNone(m)
+        self.assertIsNotNone(m, url)
         # expected must return [is_group, channel, vod_id]
         self.assertEqual(expected, list(m.groups()))
 
@@ -51,6 +52,10 @@ class TestPluginFilmon(unittest.TestCase):
         self._test_regex('https://www.filmon.com/tv/bbc-news',
                          [None, 'bbc-news', None])
 
+    def test_regex_live_stream_tv_with_channel_in_name(self):
+        self._test_regex('https://www.filmon.com/tv/channel-4',
+                         [None, 'channel-4', None])
+
     def test_regex_live_stream_tv_number(self):
         self._test_regex('https://www.filmon.tv/tv/55',
                          [None, '55', None])