We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Connectcast stream fails with "invalid url"
Attempting to load an active connectcast stream via `streamlink connectcast.tv/streamname` results in an error:
`error: Unable to open URL:  (Invalid URL '': No schema supplied. Perhaps you mean http://?)`

Similarly, using `http://connectcast.tv/streamname` for the url also fails.

Running on Windows, built with python 3.5.0rc2


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/streamlink/plugins/connectcast.py`
Content:
```
1 import re
2 import json
3 
4 from streamlink.plugin import Plugin
5 from streamlink.plugin.api import http, validate
6 from streamlink.stream import HDSStream
7 
8 SWF_URL = "https://www.connectcast.tv/jwplayer/jwplayer.flash.swf"
9 
10 _url_re = re.compile("http(s)?://(\w+\.)?connectcast.tv/")
11 _manifest_re = re.compile(".*data-playback=\"([^\"]*)\".*")
12 
13 
14 class ConnectCast(Plugin):
15     @classmethod
16     def can_handle_url(self, url):
17         return _url_re.match(url)
18 
19     def _get_streams(self):
20         res = http.get(self.url)
21         match = _manifest_re.search(res.text)
22         manifest = match.group(1)
23         streams = {}
24         streams.update(
25             HDSStream.parse_manifest(self.session, manifest, pvswf=SWF_URL)
26         )
27         
28         return streams
29 
30 __plugin__ = ConnectCast
31
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/streamlink/plugins/connectcast.py b/src/streamlink/plugins/connectcast.py
--- a/src/streamlink/plugins/connectcast.py
+++ b/src/streamlink/plugins/connectcast.py
@@ -3,13 +3,11 @@
 
 from streamlink.plugin import Plugin
 from streamlink.plugin.api import http, validate
-from streamlink.stream import HDSStream
-
-SWF_URL = "https://www.connectcast.tv/jwplayer/jwplayer.flash.swf"
-
-_url_re = re.compile("http(s)?://(\w+\.)?connectcast.tv/")
-_manifest_re = re.compile(".*data-playback=\"([^\"]*)\".*")
+from streamlink.stream import RTMPStream
 
+_url_re = re.compile(r"http(?:s)?://connectcast.tv/(\w+)?")
+_stream_re = re.compile(r'<video src="mp4:(.*?)"')
+_stream_url = "http://connectcast.tv/channel/stream/{channel}"
 
 class ConnectCast(Plugin):
     @classmethod
@@ -17,14 +15,15 @@
         return _url_re.match(url)
 
     def _get_streams(self):
-        res = http.get(self.url)
-        match = _manifest_re.search(res.text)
-        manifest = match.group(1)
-        streams = {}
-        streams.update(
-            HDSStream.parse_manifest(self.session, manifest, pvswf=SWF_URL)
-        )
-        
-        return streams
+        url_match = _url_re.match(self.url)
+        stream_url = _stream_url.format(channel=url_match.group(1))
+        res = self.session.http.get(stream_url)
+        match = _stream_re.search(res.content)
+        if match:
+            params = dict(rtmp="rtmp://stream.connectcast.tv/live",
+                          playpath=match.group(1),
+                          live=True)
+
+            return dict(live=RTMPStream(self.session, params))
 
 __plugin__ = ConnectCast

{"golden_diff": "diff --git a/src/streamlink/plugins/connectcast.py b/src/streamlink/plugins/connectcast.py\n--- a/src/streamlink/plugins/connectcast.py\n+++ b/src/streamlink/plugins/connectcast.py\n@@ -3,13 +3,11 @@\n \n from streamlink.plugin import Plugin\n from streamlink.plugin.api import http, validate\n-from streamlink.stream import HDSStream\n-\n-SWF_URL = \"https://www.connectcast.tv/jwplayer/jwplayer.flash.swf\"\n-\n-_url_re = re.compile(\"http(s)?://(\\w+\\.)?connectcast.tv/\")\n-_manifest_re = re.compile(\".*data-playback=\\\"([^\\\"]*)\\\".*\")\n+from streamlink.stream import RTMPStream\n \n+_url_re = re.compile(r\"http(?:s)?://connectcast.tv/(\\w+)?\")\n+_stream_re = re.compile(r'<video src=\"mp4:(.*?)\"')\n+_stream_url = \"http://connectcast.tv/channel/stream/{channel}\"\n \n class ConnectCast(Plugin):\n     @classmethod\n@@ -17,14 +15,15 @@\n         return _url_re.match(url)\n \n     def _get_streams(self):\n-        res = http.get(self.url)\n-        match = _manifest_re.search(res.text)\n-        manifest = match.group(1)\n-        streams = {}\n-        streams.update(\n-            HDSStream.parse_manifest(self.session, manifest, pvswf=SWF_URL)\n-        )\n-        \n-        return streams\n+        url_match = _url_re.match(self.url)\n+        stream_url = _stream_url.format(channel=url_match.group(1))\n+        res = self.session.http.get(stream_url)\n+        match = _stream_re.search(res.content)\n+        if match:\n+            params = dict(rtmp=\"rtmp://stream.connectcast.tv/live\",\n+                          playpath=match.group(1),\n+                          live=True)\n+\n+            return dict(live=RTMPStream(self.session, params))\n \n __plugin__ = ConnectCast\n", "issue": "Connectcast stream fails with \"invalid url\"\nAttempting to load an active connectcast stream via `streamlink connectcast.tv/streamname` results in an error:\n`error: Unable to open URL:  (Invalid URL '': No schema supplied. Perhaps you mean http://?)`\n\nSimilarly, using `http://connectcast.tv/streamname` for the url also fails.\n\nRunning on Windows, built with python 3.5.0rc2\n\n", "before_files": [{"content": "import re\nimport json\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import http, validate\nfrom streamlink.stream import HDSStream\n\nSWF_URL = \"https://www.connectcast.tv/jwplayer/jwplayer.flash.swf\"\n\n_url_re = re.compile(\"http(s)?://(\\w+\\.)?connectcast.tv/\")\n_manifest_re = re.compile(\".*data-playback=\\\"([^\\\"]*)\\\".*\")\n\n\nclass ConnectCast(Plugin):\n    @classmethod\n    def can_handle_url(self, url):\n        return _url_re.match(url)\n\n    def _get_streams(self):\n        res = http.get(self.url)\n        match = _manifest_re.search(res.text)\n        manifest = match.group(1)\n        streams = {}\n        streams.update(\n            HDSStream.parse_manifest(self.session, manifest, pvswf=SWF_URL)\n        )\n        \n        return streams\n\n__plugin__ = ConnectCast\n", "path": "src/streamlink/plugins/connectcast.py"}], "after_files": [{"content": "import re\nimport json\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import http, validate\nfrom streamlink.stream import RTMPStream\n\n_url_re = re.compile(r\"http(?:s)?://connectcast.tv/(\\w+)?\")\n_stream_re = re.compile(r'<video src=\"mp4:(.*?)\"')\n_stream_url = \"http://connectcast.tv/channel/stream/{channel}\"\n\nclass ConnectCast(Plugin):\n    @classmethod\n    def can_handle_url(self, url):\n        return _url_re.match(url)\n\n    def _get_streams(self):\n        url_match = _url_re.match(self.url)\n        stream_url = _stream_url.format(channel=url_match.group(1))\n        res = self.session.http.get(stream_url)\n        match = _stream_re.search(res.content)\n        if match:\n            params = dict(rtmp=\"rtmp://stream.connectcast.tv/live\",\n                          playpath=match.group(1),\n                          live=True)\n\n            return dict(live=RTMPStream(self.session, params))\n\n__plugin__ = ConnectCast\n", "path": "src/streamlink/plugins/connectcast.py"}]}