Repository: streamlink/streamlink

Issue:
plugins.nicolive: Community has been deprecated
### 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)

### Collaboration

- [X] [I will provide feedback should a pull request be opened with a fix for the plugin](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback)

### Streamlink version

6.8.3

### Description

The static room url format is changed as nico community has been deprecated.

before: https://live.nicovideo.jp/watch/co3618724
now: https://live.nicovideo.jp/watch/user/16128426

### Debug log

```text
/
```


Discussion:

Patch:
diff --git a/src/streamlink/plugins/nicolive.py b/src/streamlink/plugins/nicolive.py
index 51411463..45596cc6 100644
--- a/src/streamlink/plugins/nicolive.py
+++ b/src/streamlink/plugins/nicolive.py
@@ -116,9 +116,9 @@ class NicoLiveHLSStream(HLSStream):
         self.wsclient = wsclient
 
 
-@pluginmatcher(re.compile(
-    r"https?://(?P<domain>live\d*\.nicovideo\.jp)/watch/(lv|co)\d+",
-))
+@pluginmatcher(
+    re.compile(r"https?://(?P<domain>live\d*\.nicovideo\.jp)/watch/(lv|co|user/)\d+"),
+)
 @pluginargument(
     "email",
     sensitive=True,


Test patch:
diff --git a/tests/plugins/test_nicolive.py b/tests/plugins/test_nicolive.py
index 9e4b8eb0..6be23fa0 100644
--- a/tests/plugins/test_nicolive.py
+++ b/tests/plugins/test_nicolive.py
@@ -10,12 +10,12 @@ class TestPluginCanHandleUrlNicoLive(PluginCanHandleUrl):
     __plugin__ = NicoLive
 
     should_match = [
-        "https://live2.nicovideo.jp/watch/lv534562961",
-        "http://live2.nicovideo.jp/watch/lv534562961",
-        "https://live.nicovideo.jp/watch/lv534562961",
-        "https://live2.nicovideo.jp/watch/lv534562961?ref=rtrec&zroute=recent",
-        "https://live.nicovideo.jp/watch/co2467009?ref=community",
-        "https://live.nicovideo.jp/watch/co2619719",
+        "https://live.nicovideo.jp/watch/lv123",
+        "https://live2.nicovideo.jp/watch/lv123",
+        "https://live2.nicovideo.jp/watch/lv123?ref=rtrec&zroute=recent",
+        "https://live.nicovideo.jp/watch/co456?ref=community",
+        "https://live.nicovideo.jp/watch/co456",
+        "https://live.nicovideo.jp/watch/user/789",
     ]