internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: streamlink/streamlink

Issue:
plugins.bloomberg: Always get Could not Find JSON data error from today
### 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

Getting [plugins.bloomberg][error] Could not find JSON data. Invalid URL or bot protection... consistently. 
Used to be able to solve this buy trying VPN or a different network. This does not help now.

My guess is that Bloomberg updated something on their side and the plugin is now broken?
Or Bloomberg just update their "are you a robot" check?

Tried changing User-Agent header manually and it did not help. Can someone point out what is the issue here?

### Debug log

```text
PS C:\Users\***> streamlink -l debug https://www.bloomberg.com/live/us
[cli][debug] OS:         Windows 10
[cli][debug] Python:     3.10.8
[cli][debug] Streamlink: 5.0.1
[cli][debug] Dependencies:
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.1
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.15.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.28.1
[cli][debug]  websocket-client: 1.4.1
[cli][debug] Arguments:
[cli][debug]  url=https://www.bloomberg.com/live/us
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin bloomberg for URL https://www.bloomberg.com/live/us
[plugins.bloomberg][error] Could not find JSON data. Invalid URL or bot protection...
error: No playable streams found on this URL: https://www.bloomberg.com/live/us
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/bloomberg.py b/src/streamlink/plugins/bloomberg.py
--- a/src/streamlink/plugins/bloomberg.py
+++ b/src/streamlink/plugins/bloomberg.py
@@ -102,17 +102,7 @@ def _get_vod_streams(self, data):
         return secureStreams or streams
 
     def _get_streams(self):
-        self.session.http.headers.update({
-            "authority": "www.bloomberg.com",
-            "upgrade-insecure-requests": "1",
-            "dnt": "1",
-            "accept": ";".join([
-                "text/html,application/xhtml+xml,application/xml",
-                "q=0.9,image/webp,image/apng,*/*",
-                "q=0.8,application/signed-exchange",
-                "v=b3"
-            ])
-        })
+        del self.session.http.headers["Accept-Encoding"]
 
         try:
             data = self.session.http.get(self.url, schema=validate.Schema(


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.vtvgo: '403 Client Error: Forbidden for url: ...'
### 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 build from the master branch

### Description

The vtv plugin has stopped working, and I think vtv may have changed its website. The url it returns is not accessible.

### Debug log

```text
streamlink "https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html" --loglevel=debug
[cli][info] streamlink is running as root! Be careful!
[cli][debug] OS:         Linux-4.15.0-189-generic-x86_64-with-glibc2.27
[cli][debug] Python:     3.9.13
[cli][debug] Streamlink: 5.0.1+33.ged88bcaa
[cli][debug] Dependencies:
[cli][debug]  isodate: 0.6.0
[cli][debug]  lxml: 4.8.0
[cli][debug]  pycountry: 17.5.14
[cli][debug]  pycryptodome: 3.14.1
[cli][debug]  PySocks: 1.6.5
[cli][debug]  requests: 2.27.1
[cli][debug]  websocket-client: 1.3.2
[cli][debug] Arguments:
[cli][debug]  url=https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin vtvgo for URL https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html
error: Unable to open URL: https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html (403 Client Error: Forbidden for url: https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html)
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/vtvgo.py b/src/streamlink/plugins/vtvgo.py
--- a/src/streamlink/plugins/vtvgo.py
+++ b/src/streamlink/plugins/vtvgo.py
@@ -21,6 +21,9 @@ class VTVgo(Plugin):
     AJAX_URL = "https://vtvgo.vn/ajax-get-stream"
 
     def _get_streams(self):
+        # get cookies
+        self.session.http.get("https://vtvgo.vn/")
+
         self.session.http.headers.update({
             "Origin": "https://vtvgo.vn",
             "Referer": self.url,


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.vtvgo: '403 Client Error: Forbidden for url: ...'
### 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 build from the master branch

### Description

Last month VtvGo added cookie requirements for the stream playlist, and now it seems that they added another security layer. The request to the website returns error 403.

### Debug log

```text
streamlink https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html --loglevel=debug
[cli][debug] OS:         Linux-5.15.0-53-generic-x86_64-with-glibc2.35
[cli][debug] Python:     3.10.6
[cli][debug] Streamlink: 5.1.2+4.g68dad105
[cli][debug] Dependencies:
[cli][debug]  certifi: 2022.9.24
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.1
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.15.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.28.1
[cli][debug]  urllib3: 1.26.12
[cli][debug]  websocket-client: 1.4.1
[cli][debug]  importlib-metadata: 4.6.4
[cli][debug] Arguments:
[cli][debug]  url=https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin vtvgo for URL https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html
error: Unable to open URL: https://vtvgo.vn/ajax-get-stream (403 Client Error: Forbidden for url: https://vtvgo.vn/ajax-get-stream)
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/vtvgo.py b/src/streamlink/plugins/vtvgo.py
--- a/src/streamlink/plugins/vtvgo.py
+++ b/src/streamlink/plugins/vtvgo.py
@@ -27,6 +27,7 @@ def _get_streams(self):
         self.session.http.headers.update({
             "Origin": "https://vtvgo.vn",
             "Referer": self.url,
+            "Sec-Fetch-Site": "same-origin",
             "X-Requested-With": "XMLHttpRequest",
         })
 


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.Earthcam: Not retrieving the "cam" argument. Always plays the first Cam. Fix included
### 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

When a link contains a "cam" argument and the json has multiple cam entries, the plugin chooses the first one.
I changed the following lines that retrieve the cam argument from the url

```
        parsed = urlparse(self.url)
        cam_name = parse_qsd(parsed.query).get("cam") or next(iter(data.keys()), None)
```
also added the ```from urllib.parse import urlparse``` on top

And with those changes it works. The debug below is after the changes that I made
```streamlink -l debug "https://www.earthcam.com/events/christmascams/?cam=stpetersburg_xmas"```


### Debug log

```text
[cli][debug] OS:         Linux-5.4.0-135-generic-x86_64-with-glibc2.29
[cli][debug] Python:     3.8.10
[cli][debug] Streamlink: 5.1.2
[cli][debug] Dependencies:
[cli][debug]  certifi: 2021.5.30
[cli][debug]  isodate: 0.6.0
[cli][debug]  lxml: 4.9.2
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.11.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.26.0
[cli][debug]  urllib3: 1.26.13
[cli][debug]  websocket-client: 1.2.1
[cli][debug]  importlib-metadata: 1.5.0
[cli][debug] Arguments:
[cli][debug]  url=https://www.earthcam.com/events/christmascams/?cam=stpetersburg_xmas
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin earthcam for URL https://www.earthcam.com/events/christmascams/?cam=stpetersburg_xmas
[plugins.earthcam][debug] Found cam stpetersburg_xmas
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/earthcam.py b/src/streamlink/plugins/earthcam.py
--- a/src/streamlink/plugins/earthcam.py
+++ b/src/streamlink/plugins/earthcam.py
@@ -7,6 +7,7 @@
 
 import logging
 import re
+from urllib.parse import urlparse
 
 from streamlink.plugin import Plugin, pluginmatcher
 from streamlink.plugin.api import validate
@@ -45,7 +46,7 @@ def _get_streams(self):
         if not data:
             return
 
-        cam_name = parse_qsd(self.url).get("cam") or next(iter(data.keys()), None)
+        cam_name = parse_qsd(urlparse(self.url).query).get("cam") or next(iter(data.keys()), None)
         cam_data = data.get(cam_name)
         if not cam_data:
             return


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.mitele: not working anymore for all channels
### 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

Started a few days ago. And it's not working anymore on all channels.


### Debug log

```text
Channel = Cuatro
"[cli][info] Found matching plugin mitele for URL https://www.mitele.es/directo/cuatro/
error: Unable to open URL: https://directos.mitele.es/orilinear21/live/linear21/playlist/playlist.isml/ctv.m3u8?hdnts=st=1677436035~exp=1677436214~acl=/*~hmac=abf7c67309839ee28cec8fb256dd835d76dc8067d223f9479d19b635f3c87d1c (403 Client Error: Forbidden for url: https://directos.mitele.es/orilinear21/live/linear21/playlist/playlist.isml/ctv.m3u8?hdnts=st=1677436035~exp=1677436214~acl=/*~hmac=abf7c67309839ee28cec8fb256dd835d76dc8067d223f9479d19b635f3c87d1c)"
Channel = Telecinco
"[cli][info] Found matching plugin mitele for URL https://www.mitele.es/directo/telecinco/
error: Unable to open URL: https://directos.mitele.es/orilinear01/live/linear01/main/main.isml/main.m3u8?hdnts=st=1677436216~exp=1677436396~acl=/*~hmac=5d6dc18fe9aa0ce5e287b25e425f0f14b56528fed691c559a617f1635cabbafb (403 Client Error: Forbidden for url: https://directos.mitele.es/orilinear01/live/linear01/main/main.isml/main.m3u8?hdnts=st=1677436216~exp=1677436396~acl=/*~hmac=5d6dc18fe9aa0ce5e287b25e425f0f14b56528fed691c559a617f1635cabbafb)"
etc...
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/mitele.py b/src/streamlink/plugins/mitele.py
--- a/src/streamlink/plugins/mitele.py
+++ b/src/streamlink/plugins/mitele.py
@@ -113,7 +113,12 @@ def _get_streams(self):
             urls.add(update_qsd(stream["stream"], qsd, quote_via=lambda string, *_, **__: string))
 
         for url in urls:
-            yield from HLSStream.parse_variant_playlist(self.session, url, name_fmt="{pixels}_{bitrate}").items()
+            yield from HLSStream.parse_variant_playlist(
+                self.session,
+                url,
+                headers={"Origin": "https://www.mitele.es"},
+                name_fmt="{pixels}_{bitrate}",
+            ).items()
 
 
 __plugin__ = Mitele


Test patch:
Repository: streamlink/streamlink

Issue:
cli.argparser: allow disabling session options
`streamlink_cli.argparser` should be able to set session options which default to `True` to `False`. Fix that by checking whether the argument dest on the argparse namespace is not `None` (aka set).

Currently, there are no session options which default to `True`.

----

Required for being able to add `--webbrowser=false` with respective default value of `True` on the Streamlink session.


Discussion:
I did a mistake here. This unintentionally now always sets `--http-no-ssl-verify`, which is bad.

Please don't immediately merge PRs without a review. I sometimes make mistakes.

Resolving patch:
diff --git a/src/streamlink_cli/argparser.py b/src/streamlink_cli/argparser.py
--- a/src/streamlink_cli/argparser.py
+++ b/src/streamlink_cli/argparser.py
@@ -1329,7 +1329,7 @@ def false(_): return False  # noqa: E704
 def setup_session_options(session: Streamlink, args: argparse.Namespace):
     for arg, option, mapper in _ARGUMENT_TO_SESSIONOPTION:
         value = getattr(args, arg)
-        if value is not None:
+        if value:
             if mapper is not None:
                 value = mapper(value)
             session.set_option(option, value)


Test patch:
diff --git a/tests/cli/test_argparser.py b/tests/cli/test_argparser.py
--- a/tests/cli/test_argparser.py
+++ b/tests/cli/test_argparser.py
@@ -59,23 +59,6 @@ def test_setup_session_options(parser: ArgumentParser, session: Streamlink, argv
     assert session.get_option(option) == expected
 
 
-@pytest.mark.parametrize(("default", "new", "expected"), [
-    pytest.param(False, None, False, id="Default False, unset"),
-    pytest.param(True, None, True, id="Default True, unset"),
-    pytest.param(False, False, False, id="Default False, set to False"),
-    pytest.param(False, True, True, id="Default False, set to True"),
-    pytest.param(True, False, False, id="Default True, set to False"),
-    pytest.param(True, True, True, id="Default True, set to True"),
-])
-def test_setup_session_options_override(monkeypatch: pytest.MonkeyPatch, session: Streamlink, default, new, expected):
-    arg = "NON_EXISTING_ARGPARSER_ARGUMENT"
-    key = "NON-EXISTING-SESSION-OPTION-KEY"
-    monkeypatch.setattr("streamlink_cli.argparser._ARGUMENT_TO_SESSIONOPTION", [(arg, key, None)])
-    session.set_option(key, default)
-    setup_session_options(session, Namespace(**{arg: new}))
-    assert session.get_option(key) == expected
-
-
 def test_cli_main_setup_session_options(monkeypatch: pytest.MonkeyPatch, parser: ArgumentParser, session: Streamlink):
     class StopTest(Exception):
         pass
Repository: streamlink/streamlink

Issue:
plugins.mitele: 403 Client Error: Missing hdnts for url
### 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 channel "Boing" on Mitele is not working with the plugin anymore...

### Debug log

```text
[cli][debug] OS:         Windows 10
[cli][debug] Python:     3.11.3
[cli][debug] Streamlink: 5.5.1
[cli][debug] Dependencies:
[cli][debug]  certifi: 2023.5.7
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.2
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.17
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.29.0
[cli][debug]  urllib3: 1.26.15
[cli][debug]  websocket-client: 1.5.1
[cli][debug] Arguments:
[cli][debug]  url=https://www.mitele.es/directo/boing/
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --locale=es_ES
[cli][debug]  --player-external-http=True
[cli][debug]  --player-external-http-port=339
[cli][debug]  --hls-audio-select=['*']
[cli][debug]  --ffmpeg-ffmpeg=C:\Program Files\Streamlink\ffmpeg\ffmpeg.exe
[cli][debug]  --ffmpeg-copyts=True
[cli][debug]  --http-proxy=http://AsTJems3WD4V4HgrSTWWkJm9:ROBgagn2021@es-mad.pvdata.host:8080/
[cli][info] Found matching plugin mitele for URL https://www.mitele.es/directo/boing/
[utils.l10n][debug] Language code: es_ES
error: Unable to open URL: https://livek.mediaset.es/orilinear31/live/linear31/playlist/playlist.isml/ctv.m3u8 (403 Client Error: Missing hdnts for url: https://livek.mediaset.es/orilinear31/live/linear31/playlist/playlist.isml/ctv.m3u8)
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/mitele.py b/src/streamlink/plugins/mitele.py
--- a/src/streamlink/plugins/mitele.py
+++ b/src/streamlink/plugins/mitele.py
@@ -109,6 +109,8 @@ def _get_streams(self):
                 log.warning("Stream may be protected by DRM")
                 continue
             cdn_token = tokens.get(stream["lid"], {}).get("cdn", "")
+            if not cdn_token:
+                continue
             qsd = parse_qsd(cdn_token)
             urls.add(update_qsd(stream["stream"], qsd, quote_via=lambda string, *_, **__: string))
 


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.ssh101: No playable streams found on this URL
### Checklist

- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [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

6.4.1

### Description

I always "No playable streams found on this URL"

### Debug log

```text
streamlink --loglevel=debug https://ssh101.com/securelive/index.php?id=conectatvmx
[cli][debug] OS:         Linux-5.15.116-1-pve-x86_64-with
[cli][debug] Python:     3.11.6
[cli][debug] OpenSSL:    OpenSSL 3.1.4 24 Oct 2023
[cli][debug] Streamlink: 6.4.1
[cli][debug] Dependencies:
[cli][debug]  certifi: 2023.7.22
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.3
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.19.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.31.0
[cli][debug]  trio: 0.21.0
[cli][debug]  trio-websocket: 0.11.1
[cli][debug]  typing-extensions: 4.8.0
[cli][debug]  urllib3: 1.26.18
[cli][debug]  websocket-client: 1.6.4
[cli][debug] Arguments:
[cli][debug]  url=https://ssh101.com/securelive/index.php?id=conectatvmx
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin ssh101 for URL https://ssh101.com/securelive/index.php?id=conectatvmx
error: No playable streams found on this URL: https://ssh101.com/securelive/index.php?id=conectatvmx
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/ssh101.py b/src/streamlink/plugins/ssh101.py
--- a/src/streamlink/plugins/ssh101.py
+++ b/src/streamlink/plugins/ssh101.py
@@ -1,5 +1,5 @@
 """
-$description Global live streaming platform.
+$description Global live-streaming platform.
 $url ssh101.com
 $type live
 """
@@ -21,8 +21,8 @@
 class SSH101(Plugin):
     def _get_streams(self):
         hls_url = self.session.http.get(self.url, schema=validate.Schema(
-            validate.parse_html(),
-            validate.xml_xpath_string(".//source[contains(@src,'.m3u8')]/@src"),
+            re.compile(r"src:\s*(?P<q>['\"])(?P<url>https://\S+\.m3u8)(?P=q)"),
+            validate.any(None, validate.get("url")),
         ))
         if not hls_url:
             return
@@ -32,7 +32,7 @@ def _get_streams(self):
             log.error("This stream is currently offline")
             return
 
-        return {"live": HLSStream(self.session, hls_url)}
+        return HLSStream.parse_variant_playlist(self.session, hls_url)
 
 
 __plugin__ = SSH101


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.vidio: 403 Client Error on stream token acquirement
### Checklist

- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [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

Unable to open URL: https://www.vidio.com/live/204/tokens (403 Client Error: Forbidden for url: https://www.vidio.com/live/204/tokens?type=hls)

### Description

The live stream:  https://www.vidio.com/live/204-sctv
the output: https://www.vidio.com/live/204/tokens (403 Client Error: Forbidden for url: https://www.vidio.com/live/204/tokens?type=hls)

It is missing sctv

### Debug log

```text
streamlink https://www.vidio.com/live/204-sctv best
[cli][info] Found matching plugin vidio for URL https://www.vidio.com/live/204-sctv
error: Unable to open URL: https://www.vidio.com/live/204/tokens (403 Client Error: Forbidden for url: https://www.vidio.com/live/204/tokens?type=hls)
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/vidio.py b/src/streamlink/plugins/vidio.py
--- a/src/streamlink/plugins/vidio.py
+++ b/src/streamlink/plugins/vidio.py
@@ -6,6 +6,7 @@
 import logging
 import re
 from urllib.parse import urlsplit, urlunsplit
+from uuid import uuid4
 
 from streamlink.plugin import Plugin, pluginmatcher
 from streamlink.plugin.api import validate
@@ -17,7 +18,7 @@
 
 
 @pluginmatcher(re.compile(
-    r"https?://(?:www\.)?vidio\.com/",
+    r"https?://(?:www\.)?vidio\.com/.+",
 ))
 class Vidio(Plugin):
     tokens_url = "https://www.vidio.com/live/{id}/tokens"
@@ -28,6 +29,10 @@ def _get_stream_token(self, stream_id, stream_type):
             self.tokens_url.format(id=stream_id),
             params={"type": stream_type},
             headers={"Referer": self.url},
+            cookies={
+                "ahoy_visit": str(uuid4()),
+                "ahoy_visitor": str(uuid4()),
+            },
             schema=validate.Schema(
                 validate.parse_json(),
                 {"token": str},


Test patch:
diff --git a/tests/plugins/test_vidio.py b/tests/plugins/test_vidio.py
--- a/tests/plugins/test_vidio.py
+++ b/tests/plugins/test_vidio.py
@@ -12,6 +12,5 @@ class TestPluginCanHandleUrlVidio(PluginCanHandleUrl):
     ]
 
     should_not_match = [
-        "http://www.vidio.com",
-        "https://www.vidio.com",
+        "https://www.vidio.com/",
     ]