Repository: streamlink/streamlink

Issue:
plugins.mediavitrina: no playable streams found on player URLs
### 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

Since january streamlink can't handle gazprom-media mediavitrina urls like:

https://player.mediavitrina.ru/gpm_tnt_v2/tnt/vitrinatv_web/player.html
https://player.mediavitrina.ru/gpm_friday_v2/friday/vitrinatv_web/player.html
https://player.mediavitrina.ru/tv3_v2/tv3/vitrinatv_web/player.html

The reason for that is beause mediavitrina can't open a required json file like
https://media.mediavitrina.ru/api/v3/gpm-tnt/playlist/tnt_as_array.json?application_id=&player_referer_hostname=vitrina.tv&config_checksum_sha256=&egress_version_id=1950111

what i know:
when i try to open this json file directly in browser it fails but when i specify a referer "https://player.mediavitrina.ru/" for media.mediavitrina.ru url using firefox extension it opens perfectly
so i think mediavitrina plugin does not send this referer requesting json from media.mediavitrina.ru URL, it sends referer only for player.mediavitrina.ru URLs

please fix this issue
P.S.:
it would be futureproof if this plugin just could handle https://media.mediavitrina.ru/api/v1/gpm-tnt/playlist/tnt_as_array.json URLs directly

### Debug log

```text
[cli][info] Found matching plugin mediavitrina for URL https://player.mediavitri
na.ru/gpm_tnt_v2/tnt/vitrinatv_web/player.html
error: No playable streams found on this URL: https://player.mediavitrina.ru/gpm
_tnt_v2/tnt/vitrinatv_web/player.html
```



Discussion:
Post the full `--loglevel=debug` output, as requested by the plugin issue template.
sorry guys i was wrong on referer
i have found a solution: plugin just can't handle json URL address due to recently (in january) added "-" in "gpm-tnt"
so this line
    _re_url_json = re.compile(r"https://media\.mediavitrina\.ru/(?:proxy)?api/v3/\w+/playlist/[\w-]+_as_array\.json[^\"']+")
  should be replaced with this one
      _re_url_json = re.compile(r"https://media\.mediavitrina\.ru/(?:proxy)?api/v3/[\w-]+/playlist/[\w-]+_as_array\.json[^\"']+")
      it worked for me!!!

Submit a pull request

Resolving patch:
diff --git a/src/streamlink/plugins/mediavitrina.py b/src/streamlink/plugins/mediavitrina.py
--- a/src/streamlink/plugins/mediavitrina.py
+++ b/src/streamlink/plugins/mediavitrina.py
@@ -27,7 +27,7 @@
 )\.ru/(?:live|online)""", re.VERBOSE))
 @pluginmatcher(re.compile(r"https?://player\.mediavitrina\.ru/.+/player\.html"))
 class MediaVitrina(Plugin):
-    _re_url_json = re.compile(r"https://media\.mediavitrina\.ru/(?:proxy)?api/v3/\w+/playlist/[\w-]+_as_array\.json[^\"']+")
+    _re_url_json = re.compile(r"https://media\.mediavitrina\.ru/(?:proxy)?api/v3/[\w-]+/playlist/[\w-]+_as_array\.json[^\"']+")
 
     def _get_streams(self):
         self.session.http.headers.update({"Referer": self.url})


Test patch:
diff --git a/tests/plugins/test_mediavitrina.py b/tests/plugins/test_mediavitrina.py
--- a/tests/plugins/test_mediavitrina.py
+++ b/tests/plugins/test_mediavitrina.py
@@ -34,6 +34,7 @@ class TestPluginCanHandleUrlMediaVitrina(PluginCanHandleUrl):
         "https://player.mediavitrina.ru/tvc/tvc/moretv_web/player.html",
         "https://player.mediavitrina.ru/tvzvezda/moretv_web/player.html",
         "https://player.mediavitrina.ru/u_ott/u/moretv_web/player.html",
+        "https://player.mediavitrina.ru/gpm_tnt_v2/tnt/vitrinatv_web/player.html",
     ]
 
     should_not_match = [