Repository: streamlink/streamlink

Issue:
plugins.hiplayer not working
### 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 plugin was added in https://github.com/streamlink/streamlink/pull/4507 and it has stopped working. Input URL are available on the pull request. Thanks

### Debug log

```text
~$ streamlink --version
streamlink 4.3.0
~$ 
~$ streamlink 'https://rotana.net/live-clip' best --stream-url --loglevel debug
error: Unable to validate response text: ValidationError(NoneOrAllSchema):
  ValidationError(NoneOrAllSchema):
    ValidationError(url):
      "'" is not a valid URL
~$ streamlink 'https://www.cnbcarabia.com/Pages/live' best --stream-url --loglevel debug
error: Unable to validate response text: ValidationError(NoneOrAllSchema):
  ValidationError(NoneOrAllSchema):
    ValidationError(url):
      "'" is not a valid URL
~$ streamlink 'https://www.media.gov.kw/LiveTV.aspx?PanChannel=KTV1' best --stream-url --loglevel debug
error: Unable to validate response text: ValidationError(NoneOrAllSchema):
  ValidationError(NoneOrAllSchema):
    ValidationError(url):
      "'" is not a valid URL
~$
```



Discussion:
The issue got introduced by #4702 where some named capture groups were added to regular expressions, and then the indexed capture group getters were not updated respectively. The fix is simple, but I will have to take a look at the other plugins which were affected by this as well.

Resolving patch:
diff --git a/src/streamlink/plugins/albavision.py b/src/streamlink/plugins/albavision.py
--- a/src/streamlink/plugins/albavision.py
+++ b/src/streamlink/plugins/albavision.py
@@ -93,9 +93,9 @@ def _get_live_url(self):
         schema = validate.Schema(
             validate.xml_xpath_string(".//script[contains(text(), 'LIVE_URL')]/text()"),
             validate.none_or_all(
-                re.compile(r"""LIVE_URL\s*=\s*(?P<q>['"])(.+?)(?P=q)"""),
+                re.compile(r"""LIVE_URL\s*=\s*(?P<q>['"])(?P<url>.+?)(?P=q)"""),
                 validate.none_or_all(
-                    validate.get(1),
+                    validate.get("url"),
                     validate.url(),
                 ),
             ),
@@ -108,9 +108,9 @@ def _get_token_req_url(self):
         schema = validate.Schema(
             validate.xml_xpath_string(".//script[contains(text(), 'LIVE_URL')]/text()"),
             validate.none_or_all(
-                re.compile(r"""jQuery\.get\s*\((?P<q>['"])(.+?)(?P=q)"""),
+                re.compile(r"""jQuery\.get\s*\((?P<q>['"])(?P<token>.+?)(?P=q)"""),
                 validate.none_or_all(
-                    validate.get(1),
+                    validate.get("token"),
                     validate.url(),
                 ),
             ),
@@ -121,8 +121,8 @@ def _get_token_req_url(self):
         schema = validate.Schema(
             validate.xml_xpath_string(".//script[contains(text(), 'LIVE_URL')]/text()"),
             validate.none_or_all(
-                re.compile(r"""Math\.floor\(Date\.now\(\)\s*/\s*3600000\),\s*(?P<q>['"])(.+?)(?P=q)"""),
-                validate.none_or_all(validate.get(1)),
+                re.compile(r"""Math\.floor\(Date\.now\(\)\s*/\s*3600000\),\s*(?P<q>['"])(?P<token>.+?)(?P=q)"""),
+                validate.none_or_all(validate.get("token")),
             ),
         )
         token_req_str = schema.validate(self.page)
diff --git a/src/streamlink/plugins/hiplayer.py b/src/streamlink/plugins/hiplayer.py
--- a/src/streamlink/plugins/hiplayer.py
+++ b/src/streamlink/plugins/hiplayer.py
@@ -38,8 +38,11 @@ def _get_streams(self):
                 validate.parse_html(),
                 validate.xml_xpath_string(".//script[contains(text(), 'https://hiplayer.hibridcdn.net/l/')]/text()"),
                 validate.none_or_all(
-                    re.compile(r"""(?P<q>['"])(https://hiplayer.hibridcdn.net/l/.+?)(?P=q)"""),
-                    validate.none_or_all(validate.get(1), validate.url()),
+                    re.compile(r"""(?P<q>['"])(?P<url>https://hiplayer.hibridcdn.net/l/.+?)(?P=q)"""),
+                    validate.none_or_all(
+                        validate.get("url"),
+                        validate.url(),
+                    ),
                 ),
             ),
         )
diff --git a/src/streamlink/plugins/htv.py b/src/streamlink/plugins/htv.py
--- a/src/streamlink/plugins/htv.py
+++ b/src/streamlink/plugins/htv.py
@@ -80,8 +80,11 @@ def _get_streams(self):
                 validate.parse_html(),
                 validate.xml_xpath_string(".//script[contains(text(), 'playlist.m3u8')]/text()"),
                 validate.none_or_all(
-                    re.compile(r"""var\s+iosUrl\s*=\s*(?P<q>")(.+?)(?P=q)"""),
-                    validate.none_or_all(validate.get(1), validate.url()),
+                    re.compile(r"""var\s+iosUrl\s*=\s*(?P<q>")(?P<url>.+?)(?P=q)"""),
+                    validate.none_or_all(
+                        validate.get("url"),
+                        validate.url(),
+                    ),
                 ),
             ),
         )


Test patch: