Repository: streamlink/streamlink

Issue:
plugins.NOWNEWS: They had changed the API
### 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

-

### Description

streamlink https://news.now.com/home/live
[cli][info] streamlink is running as root! Be careful!
[cli][info] Found matching plugin nownews for URL https://news.now.com/home/live
error: Unable to open URL: https://hkt-mobile-api.nowtv.now.com/09/1/getLiveURL (HTTPSConnectionPool(host='hkt-mobile-api.nowtv.now.com', port=443): Max retries exceeded with url: /09/1/getLiveURL (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1006)'))))

NEW API: https://webtvapi.now.com/10/7/getLiveURL
PLAYLOAD:
{"contentId":"332","contentType":"Channel","audioCode":"N","deviceId":"_MYDEVICE_ID_","deviceType":"WEB","secureCookie":null,"callerReferenceNo":"[THE REFERNO]","profileId":null}

RESPONE:
{
    "asset": [
        "https://ewcdn04.nowe.com/session/10-fbe942f9[the info]ad4502fee7791/Content/DASH_VOS3/Live/channel(VOS_CH332N)/manifest.mpd?token=286209[the info]6a03695f2[the info]a_1713870587"
    ],
    "drmToken": "4b2fe22[the info]",
    "responseCode": "SUCCESS",
    "callerReferenceNo": "[the info]",
    "serverReferenceNo": "[[the info]][the info]",
    "elapsedTime": 89
}

### Debug log

```text
# streamlink https://news.now.com/home/live
[cli][info] streamlink is running as root! Be careful!
[cli][info] Found matching plugin nownews for URL https://news.now.com/home/live
error: Unable to open URL: https://hkt-mobile-api.nowtv.now.com/09/1/getLiveURL (HTTPSConnectionPool(host='hkt-mobile-api.nowtv.now.com', port=443): Max retries exceeded with url: /09/1/getLiveURL (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1006)'))))
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/nownews.py b/src/streamlink/plugins/nownews.py
deleted file mode 100644
--- a/src/streamlink/plugins/nownews.py
+++ /dev/null
@@ -1,54 +0,0 @@
-"""
-$description Live streaming news channel owned by Now/PCCW Group, based in Hong Kong.
-$url news.now.com
-$type live
-"""
-
-import json
-import logging
-import re
-
-from streamlink.plugin import Plugin, pluginmatcher
-from streamlink.stream.hls import HLSStream
-
-
-log = logging.getLogger(__name__)
-
-
-@pluginmatcher(re.compile(
-    r"https?://news\.now\.com/home/live",
-))
-class NowNews(Plugin):
-    epg_re = re.compile(r"""epg.getEPG\("(\d+)"\);""")
-    api_url = "https://hkt-mobile-api.nowtv.now.com/09/1/getLiveURL"
-    backup_332_api = "https://d7lz7jwg8uwgn.cloudfront.net/apps_resource/news/live.json"
-    backup_332_stream = "https://d3i3yn6xwv1jpw.cloudfront.net/live/now332/playlist.m3u8"
-
-    def _get_streams(self):
-        res = self.session.http.get(self.url)
-        m = self.epg_re.search(res.text)
-        channel_id = m and m.group(1)
-        if channel_id:
-            log.debug("Channel ID: {0}".format(channel_id))
-
-            if channel_id == "332":
-                # there is a special backup stream for channel 332
-                bk_res = self.session.http.get(self.backup_332_api)
-                bk_data = self.session.http.json(bk_res)
-                if bk_data and bk_data["backup"]:
-                    log.info("Using backup stream for channel 332")
-                    return HLSStream.parse_variant_playlist(self.session, self.backup_332_stream)
-
-            api_res = self.session.http.post(self.api_url,
-                                             headers={"Content-Type": "application/json"},
-                                             data=json.dumps(dict(channelno=channel_id,
-                                                                  mode="prod",
-                                                                  audioCode="",
-                                                                  format="HLS",
-                                                                  callerReferenceNo="20140702122500")))
-            data = self.session.http.json(api_res)
-            for stream_url in data.get("asset", {}).get("hls", {}).get("adaptive", []):
-                return HLSStream.parse_variant_playlist(self.session, stream_url)
-
-
-__plugin__ = NowNews


Test patch:
diff --git a/tests/plugins/test_nownews.py b/tests/plugins/test_nownews.py
deleted file mode 100644
--- a/tests/plugins/test_nownews.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from streamlink.plugins.nownews import NowNews
-from tests.plugins import PluginCanHandleUrl
-
-
-class TestPluginCanHandleUrlNowNews(PluginCanHandleUrl):
-    __plugin__ = NowNews
-
-    should_match = [
-        "https://news.now.com/home/live",
-        "http://news.now.com/home/live",
-        "https://news.now.com/home/live331a",
-        "http://news.now.com/home/live331a",
-    ]
-
-    should_not_match = [
-        "https://news.now.com/home/local",
-        "http://media.now.com.hk/",
-    ]