We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plugins.euronews: www.euronews.com and ru.euronews.com provide different APIs
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest stable release

### Description

The main Euronews site has started using the new API some time ago, and the current streamlink's plugin, euronews.py, indeed works correctly with the main site. However, some (?) language specific subdomains, like https://ru.euronews.com/, still use the old API (compare, e.g., the following responses: https://www.euronews.com/api/watchlive.json vs. https://ru.euronews.com/api/watchlive.json).

[This previous version of euronews.py](https://github.com/streamlink/streamlink/blob/fcda5b681422718cc0a95b3de45d3fe2698d8e29/src/streamlink/plugins/euronews.py) works fine with the old API but obviously doesn't support the new one. Would be great if the plugin could support both versions.

### Debug log

```text
[cli][info] Found matching plugin euronews for URL https://ru.euronews.com/live
error: No playable streams found on this URL: https://ru.euronews.com/live
```


--- 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 from urllib.parse import urlparse
3 
4 from streamlink.plugin import Plugin, pluginmatcher
5 from streamlink.plugin.api import validate
6 from streamlink.plugin.api.utils import itertags
7 from streamlink.stream import HTTPStream
8 
9 
10 @pluginmatcher(re.compile(
11     r'https?://(?:\w+\.)*euronews\.com/'
12 ))
13 class Euronews(Plugin):
14     def _get_vod_stream(self):
15         def find_video_url(content):
16             for elem in itertags(content, "meta"):
17                 if elem.attributes.get("property") == "og:video":
18                     return elem.attributes.get("content")
19 
20         video_url = self.session.http.get(self.url, schema=validate.Schema(
21             validate.transform(find_video_url),
22             validate.any(None, validate.url())
23         ))
24 
25         if video_url is not None:
26             return dict(vod=HTTPStream(self.session, video_url))
27 
28     def _get_live_streams(self):
29         def find_video_id(content):
30             for elem in itertags(content, "div"):
31                 if elem.attributes.get("id") == "pfpPlayer" and elem.attributes.get("data-google-src") is not None:
32                     return elem.attributes.get("data-video-id")
33 
34         video_id = self.session.http.get(self.url, schema=validate.Schema(
35             validate.transform(find_video_id),
36             validate.any(None, str)
37         ))
38 
39         if video_id is not None:
40             return self.session.streams(f"https://www.youtube.com/watch?v={video_id}")
41 
42     def _get_streams(self):
43         parsed = urlparse(self.url)
44 
45         if parsed.path == "/live":
46             return self._get_live_streams()
47         else:
48             return self._get_vod_stream()
49 
50 
51 __plugin__ = Euronews
52
```
--- 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/euronews.py b/src/streamlink/plugins/euronews.py
--- a/src/streamlink/plugins/euronews.py
+++ b/src/streamlink/plugins/euronews.py
@@ -3,14 +3,17 @@
 
 from streamlink.plugin import Plugin, pluginmatcher
 from streamlink.plugin.api import validate
-from streamlink.plugin.api.utils import itertags
-from streamlink.stream import HTTPStream
+from streamlink.plugin.api.utils import itertags, parse_json
+from streamlink.stream import HLSStream, HTTPStream
+from streamlink.utils import update_scheme
 
 
 @pluginmatcher(re.compile(
-    r'https?://(?:\w+\.)*euronews\.com/'
+    r'https?://(?:(?P<subdomain>\w+)\.)?euronews\.com/'
 ))
 class Euronews(Plugin):
+    API_URL = "https://{subdomain}.euronews.com/api/watchlive.json"
+
     def _get_vod_stream(self):
         def find_video_url(content):
             for elem in itertags(content, "meta"):
@@ -39,6 +42,24 @@
         if video_id is not None:
             return self.session.streams(f"https://www.youtube.com/watch?v={video_id}")
 
+        info_url = self.session.http.get(self.API_URL.format(subdomain=self.match.group("subdomain")), schema=validate.Schema(
+            validate.transform(parse_json),
+            {"url": validate.url()},
+            validate.get("url"),
+            validate.transform(lambda url: update_scheme("https://", url))
+        ))
+        hls_url = self.session.http.get(info_url, schema=validate.Schema(
+            validate.transform(parse_json),
+            {
+                "status": "ok",
+                "protocol": "hls",
+                "primary": validate.url()
+            },
+            validate.get("primary")
+        ))
+
+        return HLSStream.parse_variant_playlist(self.session, hls_url)
+
     def _get_streams(self):
         parsed = urlparse(self.url)

{"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,14 +3,17 @@\n \n from streamlink.plugin import Plugin, pluginmatcher\n from streamlink.plugin.api import validate\n-from streamlink.plugin.api.utils import itertags\n-from streamlink.stream import HTTPStream\n+from streamlink.plugin.api.utils import itertags, parse_json\n+from streamlink.stream import HLSStream, HTTPStream\n+from streamlink.utils import update_scheme\n \n \n @pluginmatcher(re.compile(\n-    r'https?://(?:\\w+\\.)*euronews\\.com/'\n+    r'https?://(?:(?P<subdomain>\\w+)\\.)?euronews\\.com/'\n ))\n class Euronews(Plugin):\n+    API_URL = \"https://{subdomain}.euronews.com/api/watchlive.json\"\n+\n     def _get_vod_stream(self):\n         def find_video_url(content):\n             for elem in itertags(content, \"meta\"):\n@@ -39,6 +42,24 @@\n         if video_id is not None:\n             return self.session.streams(f\"https://www.youtube.com/watch?v={video_id}\")\n \n+        info_url = self.session.http.get(self.API_URL.format(subdomain=self.match.group(\"subdomain\")), schema=validate.Schema(\n+            validate.transform(parse_json),\n+            {\"url\": validate.url()},\n+            validate.get(\"url\"),\n+            validate.transform(lambda url: update_scheme(\"https://\", url))\n+        ))\n+        hls_url = self.session.http.get(info_url, schema=validate.Schema(\n+            validate.transform(parse_json),\n+            {\n+                \"status\": \"ok\",\n+                \"protocol\": \"hls\",\n+                \"primary\": validate.url()\n+            },\n+            validate.get(\"primary\")\n+        ))\n+\n+        return HLSStream.parse_variant_playlist(self.session, hls_url)\n+\n     def _get_streams(self):\n         parsed = urlparse(self.url)\n", "issue": "plugins.euronews: www.euronews.com and ru.euronews.com provide different APIs\n### Checklist\n\n- [X] This is a plugin issue and not a different kind of issue\n- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)\n- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)\n- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)\n\n### Streamlink version\n\nLatest stable release\n\n### Description\n\nThe main Euronews site has started using the new API some time ago, and the current streamlink's plugin, euronews.py, indeed works correctly with the main site. However, some (?) language specific subdomains, like https://ru.euronews.com/, still use the old API (compare, e.g., the following responses: https://www.euronews.com/api/watchlive.json vs. https://ru.euronews.com/api/watchlive.json).\r\n\r\n[This previous version of euronews.py](https://github.com/streamlink/streamlink/blob/fcda5b681422718cc0a95b3de45d3fe2698d8e29/src/streamlink/plugins/euronews.py) works fine with the old API but obviously doesn't support the new one. Would be great if the plugin could support both versions.\n\n### Debug log\n\n```text\n[cli][info] Found matching plugin euronews for URL https://ru.euronews.com/live\r\nerror: No playable streams found on this URL: https://ru.euronews.com/live\n```\n\n", "before_files": [{"content": "import re\nfrom urllib.parse import urlparse\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.plugin.api.utils import itertags\nfrom streamlink.stream import HTTPStream\n\n\n@pluginmatcher(re.compile(\n    r'https?://(?:\\w+\\.)*euronews\\.com/'\n))\nclass Euronews(Plugin):\n    def _get_vod_stream(self):\n        def find_video_url(content):\n            for elem in itertags(content, \"meta\"):\n                if elem.attributes.get(\"property\") == \"og:video\":\n                    return elem.attributes.get(\"content\")\n\n        video_url = self.session.http.get(self.url, schema=validate.Schema(\n            validate.transform(find_video_url),\n            validate.any(None, validate.url())\n        ))\n\n        if video_url is not None:\n            return dict(vod=HTTPStream(self.session, video_url))\n\n    def _get_live_streams(self):\n        def find_video_id(content):\n            for elem in itertags(content, \"div\"):\n                if elem.attributes.get(\"id\") == \"pfpPlayer\" and elem.attributes.get(\"data-google-src\") is not None:\n                    return elem.attributes.get(\"data-video-id\")\n\n        video_id = self.session.http.get(self.url, schema=validate.Schema(\n            validate.transform(find_video_id),\n            validate.any(None, str)\n        ))\n\n        if video_id is not None:\n            return self.session.streams(f\"https://www.youtube.com/watch?v={video_id}\")\n\n    def _get_streams(self):\n        parsed = urlparse(self.url)\n\n        if parsed.path == \"/live\":\n            return self._get_live_streams()\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\nfrom urllib.parse import urlparse\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.plugin.api.utils import itertags, parse_json\nfrom streamlink.stream import HLSStream, HTTPStream\nfrom streamlink.utils import update_scheme\n\n\n@pluginmatcher(re.compile(\n    r'https?://(?:(?P<subdomain>\\w+)\\.)?euronews\\.com/'\n))\nclass Euronews(Plugin):\n    API_URL = \"https://{subdomain}.euronews.com/api/watchlive.json\"\n\n    def _get_vod_stream(self):\n        def find_video_url(content):\n            for elem in itertags(content, \"meta\"):\n                if elem.attributes.get(\"property\") == \"og:video\":\n                    return elem.attributes.get(\"content\")\n\n        video_url = self.session.http.get(self.url, schema=validate.Schema(\n            validate.transform(find_video_url),\n            validate.any(None, validate.url())\n        ))\n\n        if video_url is not None:\n            return dict(vod=HTTPStream(self.session, video_url))\n\n    def _get_live_streams(self):\n        def find_video_id(content):\n            for elem in itertags(content, \"div\"):\n                if elem.attributes.get(\"id\") == \"pfpPlayer\" and elem.attributes.get(\"data-google-src\") is not None:\n                    return elem.attributes.get(\"data-video-id\")\n\n        video_id = self.session.http.get(self.url, schema=validate.Schema(\n            validate.transform(find_video_id),\n            validate.any(None, str)\n        ))\n\n        if video_id is not None:\n            return self.session.streams(f\"https://www.youtube.com/watch?v={video_id}\")\n\n        info_url = self.session.http.get(self.API_URL.format(subdomain=self.match.group(\"subdomain\")), schema=validate.Schema(\n            validate.transform(parse_json),\n            {\"url\": validate.url()},\n            validate.get(\"url\"),\n            validate.transform(lambda url: update_scheme(\"https://\", url))\n        ))\n        hls_url = self.session.http.get(info_url, schema=validate.Schema(\n            validate.transform(parse_json),\n            {\n                \"status\": \"ok\",\n                \"protocol\": \"hls\",\n                \"primary\": validate.url()\n            },\n            validate.get(\"primary\")\n        ))\n\n        return HLSStream.parse_variant_playlist(self.session, hls_url)\n\n    def _get_streams(self):\n        parsed = urlparse(self.url)\n\n        if parsed.path == \"/live\":\n            return self._get_live_streams()\n        else:\n            return self._get_vod_stream()\n\n\n__plugin__ = Euronews\n", "path": "src/streamlink/plugins/euronews.py"}]}