prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Euronews error, unable to open URL
  <!--
  Thanks for reporting a bug!
  USE THE TEMPLATE. Otherwise your bug report may be rejected.
  
  First, see the contribution guidelines:
  https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink
  
  Also check the list of open and closed bug reports:
  https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22bug%22
  
  Please see the text preview to avoid unnecessary formatting errors.
  -->
  
  
  ## Bug Report
  
  <!-- Replace [ ] with [x] in order to check the box -->
  - [x] This is a bug report and I have read the contribution guidelines.
  
  
  ### Description
  
  <!-- Explain the bug as thoroughly as you can. Don't leave out information which is necessary for us to reproduce and debug this issue. -->
  I'm unable to open Euronews live stream.
  
  ### Expected / Actual behavior
  
  <!-- What do you expect to happen, and what is actually happening? -->
  I expect the stream to open in my media player.
  Instead I get this:
  ```
  marco@vbox-ubuntu1804:~$ streamlink http://it.euronews.com/live
  [cli][info] Found matching plugin euronews for URL http://it.euronews.com/live
  error: Unable to open URL: //euronews-it-p-api.hexaglobe.net/1c903a19de71387485a0f6f74d7923f5/5b8a5583/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls (Invalid URL '//euronews-it-p-api.hexaglobe.net/1c903a19de71387485a0f6f74d7923f5/5b8a5583/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls': No schema supplied. Perhaps you meant http:////euronews-it-p-api.hexaglobe.net/1c903a19de71387485a0f6f74d7923f5/5b8a5583/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls?)
  ```
  
  ### Reproduction steps / Explicit stream URLs to test
  
  <!-- How can we reproduce this? Please note the exact steps below using the list format supplied. If you need more steps please add them. -->
  
  Run this command:
  ```
  streamlink http://it.euronews.com/live
  ```
  
  ### Log output
  
  <!--
  TEXT LOG OUTPUT IS REQUIRED for a bug report!
  Use the `--loglevel debug` parameter and avoid using parameters which suppress log output.
  https://streamlink.github.io/cli.html#cmdoption-l
  
  Make sure to **remove usernames and passwords**
  You can copy the output to https://gist.github.com/ or paste it below.
  -->
  
  ```
  marco@vbox-ubuntu1804:~$ streamlink --loglevel debug http://it.euronews.com/live
  [cli][debug] OS:         Linux-4.15.0-33-generic-x86_64-with-Ubuntu-18.04-bionic
  [cli][debug] Python:     3.6.5
  [cli][debug] Streamlink: 0.14.2+92.gc7bef14b
  [cli][debug] Requests(2.18.4), Socks(1.6.7), Websocket(0.51.0)
  [cli][info] Found matching plugin euronews for URL http://it.euronews.com/live
  error: Unable to open URL: //euronews-it-p-api.hexaglobe.net/688afb391d4325cad6765c6dc61585a4/5b8a7b36/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls (Invalid URL '//euronews-it-p-api.hexaglobe.net/688afb391d4325cad6765c6dc61585a4/5b8a7b36/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls': No schema supplied. Perhaps you meant http:////euronews-it-p-api.hexaglobe.net/688afb391d4325cad6765c6dc61585a4/5b8a7b36/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls?)
  ```
  
  
  ### Additional comments, screenshots, etc.
  Streamlink versions tested: 0.9.0, 0.14.2 from pip, master from git
  Same error with all of them.
  
  
  [Love Streamlink? Please consider supporting our collective. Thanks!](https://opencollective.com/streamlink/donate)
  
  
  --- 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/euronews.py`
  Content:
  ```
  1 import re
  2 
  3 from streamlink.plugin import Plugin
  4 from streamlink.plugin.api import validate
  5 from streamlink.stream import HLSStream, HTTPStream
  6 
  7 
  8 class Euronews(Plugin):
  9     _url_re = re.compile(r"http(?:s)?://(\w+)\.?euronews.com/(live|.*)")
  10     _re_vod = re.compile(r'<meta\s+property="og:video"\s+content="(http.*?)"\s*/>')
  11     _live_api_url = "http://{0}.euronews.com/api/watchlive.json"
  12     _live_schema = validate.Schema({
  13         u"url": validate.url()
  14     })
  15     _stream_api_schema = validate.Schema({
  16         u'status': u'ok',
  17         u'primary': validate.url(),
  18         validate.optional(u'backup'): validate.url()
  19     })
  20 
  21     @classmethod
  22     def can_handle_url(cls, url):
  23         return cls._url_re.match(url)
  24 
  25     def _get_vod_stream(self):
  26         """
  27         Find the VOD video url
  28         :return: video url
  29         """
  30         res = self.session.http.get(self.url)
  31         video_urls = self._re_vod.findall(res.text)
  32         if len(video_urls):
  33             return dict(vod=HTTPStream(self.session, video_urls[0]))
  34 
  35     def _get_live_streams(self, subdomain):
  36         """
  37         Get the live stream in a particular language
  38         :param subdomain:
  39         :return:
  40         """
  41         res = self.session.http.get(self._live_api_url.format(subdomain))
  42         live_res = self.session.http.json(res, schema=self._live_schema)
  43         api_res = self.session.http.get(live_res[u"url"])
  44         stream_data = self.session.http.json(api_res, schema=self._stream_api_schema)
  45         return HLSStream.parse_variant_playlist(self.session, stream_data[u'primary'])
  46 
  47     def _get_streams(self):
  48         """
  49         Find the streams for euronews
  50         :return:
  51         """
  52         match = self._url_re.match(self.url)
  53         subdomain, path = match.groups()
  54 
  55         if path == "live":
  56             return self._get_live_streams(subdomain)
  57         else:
  58             return self._get_vod_stream()
  59 
  60 
  61 __plugin__ = Euronews
  62
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/src/streamlink/plugins/euronews.py b/src/streamlink/plugins/euronews.py
  --- a/src/streamlink/plugins/euronews.py
  +++ b/src/streamlink/plugins/euronews.py
  @@ -3,10 +3,11 @@
   from streamlink.plugin import Plugin
   from streamlink.plugin.api import validate
   from streamlink.stream import HLSStream, HTTPStream
  +from streamlink.utils.url import update_scheme
   
   
   class Euronews(Plugin):
  -    _url_re = re.compile(r"http(?:s)?://(\w+)\.?euronews.com/(live|.*)")
  +    _url_re = re.compile(r'(?P<scheme>https?)://(?P<subdomain>\w+)\.?euronews.com/(?P<path>live|.*)')
       _re_vod = re.compile(r'<meta\s+property="og:video"\s+content="(http.*?)"\s*/>')
       _live_api_url = "http://{0}.euronews.com/api/watchlive.json"
       _live_schema = validate.Schema({
  @@ -32,28 +33,29 @@
           if len(video_urls):
               return dict(vod=HTTPStream(self.session, video_urls[0]))
   
  -    def _get_live_streams(self, subdomain):
  +    def _get_live_streams(self, match):
           """
           Get the live stream in a particular language
  -        :param subdomain:
  +        :param match:
           :return:
           """
  -        res = self.session.http.get(self._live_api_url.format(subdomain))
  -        live_res = self.session.http.json(res, schema=self._live_schema)
  -        api_res = self.session.http.get(live_res[u"url"])
  -        stream_data = self.session.http.json(api_res, schema=self._stream_api_schema)
  -        return HLSStream.parse_variant_playlist(self.session, stream_data[u'primary'])
  +        live_url = self._live_api_url.format(match.get("subdomain"))
  +        live_res = self.session.http.json(self.session.http.get(live_url), schema=self._live_schema)
  +
  +        api_url = update_scheme("{0}:///".format(match.get("scheme")), live_res["url"])
  +        api_res = self.session.http.json(self.session.http.get(api_url), schema=self._stream_api_schema)
  +
  +        return HLSStream.parse_variant_playlist(self.session, api_res["primary"])
   
       def _get_streams(self):
           """
           Find the streams for euronews
           :return:
           """
  -        match = self._url_re.match(self.url)
  -        subdomain, path = match.groups()
  +        match = self._url_re.match(self.url).groupdict()
   
  -        if path == "live":
  -            return self._get_live_streams(subdomain)
  +        if match.get("path") == "live":
  +            return self._get_live_streams(match)
           else:
               return self._get_vod_stream()
  
verification_info: {"golden_diff": "diff --git a/src/streamlink/plugins/euronews.py b/src/streamlink/plugins/euronews.py\n--- a/src/streamlink/plugins/euronews.py\n+++ b/src/streamlink/plugins/euronews.py\n@@ -3,10 +3,11 @@\n from streamlink.plugin import Plugin\n from streamlink.plugin.api import validate\n from streamlink.stream import HLSStream, HTTPStream\n+from streamlink.utils.url import update_scheme\n \n \n class Euronews(Plugin):\n-    _url_re = re.compile(r\"http(?:s)?://(\\w+)\\.?euronews.com/(live|.*)\")\n+    _url_re = re.compile(r'(?P<scheme>https?)://(?P<subdomain>\\w+)\\.?euronews.com/(?P<path>live|.*)')\n     _re_vod = re.compile(r'<meta\\s+property=\"og:video\"\\s+content=\"(http.*?)\"\\s*/>')\n     _live_api_url = \"http://{0}.euronews.com/api/watchlive.json\"\n     _live_schema = validate.Schema({\n@@ -32,28 +33,29 @@\n         if len(video_urls):\n             return dict(vod=HTTPStream(self.session, video_urls[0]))\n \n-    def _get_live_streams(self, subdomain):\n+    def _get_live_streams(self, match):\n         \"\"\"\n         Get the live stream in a particular language\n-        :param subdomain:\n+        :param match:\n         :return:\n         \"\"\"\n-        res = self.session.http.get(self._live_api_url.format(subdomain))\n-        live_res = self.session.http.json(res, schema=self._live_schema)\n-        api_res = self.session.http.get(live_res[u\"url\"])\n-        stream_data = self.session.http.json(api_res, schema=self._stream_api_schema)\n-        return HLSStream.parse_variant_playlist(self.session, stream_data[u'primary'])\n+        live_url = self._live_api_url.format(match.get(\"subdomain\"))\n+        live_res = self.session.http.json(self.session.http.get(live_url), schema=self._live_schema)\n+\n+        api_url = update_scheme(\"{0}:///\".format(match.get(\"scheme\")), live_res[\"url\"])\n+        api_res = self.session.http.json(self.session.http.get(api_url), schema=self._stream_api_schema)\n+\n+        return HLSStream.parse_variant_playlist(self.session, api_res[\"primary\"])\n \n     def _get_streams(self):\n         \"\"\"\n         Find the streams for euronews\n         :return:\n         \"\"\"\n-        match = self._url_re.match(self.url)\n-        subdomain, path = match.groups()\n+        match = self._url_re.match(self.url).groupdict()\n \n-        if path == \"live\":\n-            return self._get_live_streams(subdomain)\n+        if match.get(\"path\") == \"live\":\n+            return self._get_live_streams(match)\n         else:\n             return self._get_vod_stream()\n", "issue": "Euronews error, unable to open URL\n<!--\r\nThanks for reporting a bug!\r\nUSE THE TEMPLATE. Otherwise your bug report may be rejected.\r\n\r\nFirst, see the contribution guidelines:\r\nhttps://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink\r\n\r\nAlso check the list of open and closed bug reports:\r\nhttps://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22bug%22\r\n\r\nPlease see the text preview to avoid unnecessary formatting errors.\r\n-->\r\n\r\n\r\n## Bug Report\r\n\r\n<!-- Replace [ ] with [x] in order to check the box -->\r\n- [x] This is a bug report and I have read the contribution guidelines.\r\n\r\n\r\n### Description\r\n\r\n<!-- Explain the bug as thoroughly as you can. Don't leave out information which is necessary for us to reproduce and debug this issue. -->\r\nI'm unable to open Euronews live stream.\r\n\r\n### Expected / Actual behavior\r\n\r\n<!-- What do you expect to happen, and what is actually happening? -->\r\nI expect the stream to open in my media player.\r\nInstead I get this:\r\n```\r\nmarco@vbox-ubuntu1804:~$ streamlink http://it.euronews.com/live\r\n[cli][info] Found matching plugin euronews for URL http://it.euronews.com/live\r\nerror: Unable to open URL: //euronews-it-p-api.hexaglobe.net/1c903a19de71387485a0f6f74d7923f5/5b8a5583/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls (Invalid URL '//euronews-it-p-api.hexaglobe.net/1c903a19de71387485a0f6f74d7923f5/5b8a5583/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls': No schema supplied. Perhaps you meant http:////euronews-it-p-api.hexaglobe.net/1c903a19de71387485a0f6f74d7923f5/5b8a5583/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls?)\r\n```\r\n\r\n### Reproduction steps / Explicit stream URLs to test\r\n\r\n<!-- How can we reproduce this? Please note the exact steps below using the list format supplied. If you need more steps please add them. -->\r\n\r\nRun this command:\r\n```\r\nstreamlink http://it.euronews.com/live\r\n```\r\n\r\n### Log output\r\n\r\n<!--\r\nTEXT LOG OUTPUT IS REQUIRED for a bug report!\r\nUse the `--loglevel debug` parameter and avoid using parameters which suppress log output.\r\nhttps://streamlink.github.io/cli.html#cmdoption-l\r\n\r\nMake sure to **remove usernames and passwords**\r\nYou can copy the output to https://gist.github.com/ or paste it below.\r\n-->\r\n\r\n```\r\nmarco@vbox-ubuntu1804:~$ streamlink --loglevel debug http://it.euronews.com/live\r\n[cli][debug] OS:         Linux-4.15.0-33-generic-x86_64-with-Ubuntu-18.04-bionic\r\n[cli][debug] Python:     3.6.5\r\n[cli][debug] Streamlink: 0.14.2+92.gc7bef14b\r\n[cli][debug] Requests(2.18.4), Socks(1.6.7), Websocket(0.51.0)\r\n[cli][info] Found matching plugin euronews for URL http://it.euronews.com/live\r\nerror: Unable to open URL: //euronews-it-p-api.hexaglobe.net/688afb391d4325cad6765c6dc61585a4/5b8a7b36/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls (Invalid URL '//euronews-it-p-api.hexaglobe.net/688afb391d4325cad6765c6dc61585a4/5b8a7b36/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls': No schema supplied. Perhaps you meant http:////euronews-it-p-api.hexaglobe.net/688afb391d4325cad6765c6dc61585a4/5b8a7b36/euronews/euronews-euronews-website-web-responsive-2/it/stream_info.php?format=hls?)\r\n```\r\n\r\n\r\n### Additional comments, screenshots, etc.\r\nStreamlink versions tested: 0.9.0, 0.14.2 from pip, master from git\r\nSame error with all of them.\r\n\r\n\r\n[Love Streamlink? Please consider supporting our collective. Thanks!](https://opencollective.com/streamlink/donate)\r\n\n", "before_files": [{"content": "import re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream, HTTPStream\n\n\nclass Euronews(Plugin):\n    _url_re = re.compile(r\"http(?:s)?://(\\w+)\\.?euronews.com/(live|.*)\")\n    _re_vod = re.compile(r'<meta\\s+property=\"og:video\"\\s+content=\"(http.*?)\"\\s*/>')\n    _live_api_url = \"http://{0}.euronews.com/api/watchlive.json\"\n    _live_schema = validate.Schema({\n        u\"url\": validate.url()\n    })\n    _stream_api_schema = validate.Schema({\n        u'status': u'ok',\n        u'primary': validate.url(),\n        validate.optional(u'backup'): validate.url()\n    })\n\n    @classmethod\n    def can_handle_url(cls, url):\n        return cls._url_re.match(url)\n\n    def _get_vod_stream(self):\n        \"\"\"\n        Find the VOD video url\n        :return: video url\n        \"\"\"\n        res = self.session.http.get(self.url)\n        video_urls = self._re_vod.findall(res.text)\n        if len(video_urls):\n            return dict(vod=HTTPStream(self.session, video_urls[0]))\n\n    def _get_live_streams(self, subdomain):\n        \"\"\"\n        Get the live stream in a particular language\n        :param subdomain:\n        :return:\n        \"\"\"\n        res = self.session.http.get(self._live_api_url.format(subdomain))\n        live_res = self.session.http.json(res, schema=self._live_schema)\n        api_res = self.session.http.get(live_res[u\"url\"])\n        stream_data = self.session.http.json(api_res, schema=self._stream_api_schema)\n        return HLSStream.parse_variant_playlist(self.session, stream_data[u'primary'])\n\n    def _get_streams(self):\n        \"\"\"\n        Find the streams for euronews\n        :return:\n        \"\"\"\n        match = self._url_re.match(self.url)\n        subdomain, path = match.groups()\n\n        if path == \"live\":\n            return self._get_live_streams(subdomain)\n        else:\n            return self._get_vod_stream()\n\n\n__plugin__ = Euronews\n", "path": "src/streamlink/plugins/euronews.py"}], "after_files": [{"content": "import re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream, HTTPStream\nfrom streamlink.utils.url import update_scheme\n\n\nclass Euronews(Plugin):\n    _url_re = re.compile(r'(?P<scheme>https?)://(?P<subdomain>\\w+)\\.?euronews.com/(?P<path>live|.*)')\n    _re_vod = re.compile(r'<meta\\s+property=\"og:video\"\\s+content=\"(http.*?)\"\\s*/>')\n    _live_api_url = \"http://{0}.euronews.com/api/watchlive.json\"\n    _live_schema = validate.Schema({\n        u\"url\": validate.url()\n    })\n    _stream_api_schema = validate.Schema({\n        u'status': u'ok',\n        u'primary': validate.url(),\n        validate.optional(u'backup'): validate.url()\n    })\n\n    @classmethod\n    def can_handle_url(cls, url):\n        return cls._url_re.match(url)\n\n    def _get_vod_stream(self):\n        \"\"\"\n        Find the VOD video url\n        :return: video url\n        \"\"\"\n        res = self.session.http.get(self.url)\n        video_urls = self._re_vod.findall(res.text)\n        if len(video_urls):\n            return dict(vod=HTTPStream(self.session, video_urls[0]))\n\n    def _get_live_streams(self, match):\n        \"\"\"\n        Get the live stream in a particular language\n        :param match:\n        :return:\n        \"\"\"\n        live_url = self._live_api_url.format(match.get(\"subdomain\"))\n        live_res = self.session.http.json(self.session.http.get(live_url), schema=self._live_schema)\n\n        api_url = update_scheme(\"{0}:///\".format(match.get(\"scheme\")), live_res[\"url\"])\n        api_res = self.session.http.json(self.session.http.get(api_url), schema=self._stream_api_schema)\n\n        return HLSStream.parse_variant_playlist(self.session, api_res[\"primary\"])\n\n    def _get_streams(self):\n        \"\"\"\n        Find the streams for euronews\n        :return:\n        \"\"\"\n        match = self._url_re.match(self.url).groupdict()\n\n        if match.get(\"path\") == \"live\":\n            return self._get_live_streams(match)\n        else:\n            return self._get_vod_stream()\n\n\n__plugin__ = Euronews\n", "path": "src/streamlink/plugins/euronews.py"}]}