prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  sportschau: Does not work with the newly introduced bundesliga livestreams (Konferenz)
  ### 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
  
  Does not work with the newly introduced bundesliga livestreams (Konferenz).
  
  e.g. https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html
  
  Neither under windows nor linux. The linux version (Mint 19) was installed with apt-get, maybe is an older version.
  Windows version is actual.
  
  
  
  ### Debug log
  
  ```text
  Windows:
  
  c:\Users\deiss\Downloads\streamlink>streamlink  https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html   "best"  --loglevel debug
  [cli][debug] OS:         Windows 10
  [cli][debug] Python:     3.7.9
  [cli][debug] Streamlink: 2.1.2
  [cli][debug] Requests(2.25.1), Socks(1.7.1), Websocket(1.0.0)
  [cli][debug] Arguments:
  [cli][debug]  url=https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html
  [cli][debug]  stream=['best']
  [cli][debug]  --config=['c:\\Users\\deiss\\Downloads\\streamlink\\\\streamlinkrc']
  [cli][debug]  --loglevel=debug
  [cli][debug]  --rtmp-rtmpdump=c:\Users\deiss\Downloads\streamlink\\rtmpdump\rtmpdump.exe
  [cli][debug]  --ffmpeg-ffmpeg=c:\Users\deiss\Downloads\streamlink\\ffmpeg\ffmpeg.exe
  [cli][info] Found matching plugin sportschau for URL https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html
  [plugins.sportschau][debug] Found player js https://deviceids-medp.wdr.de/ondemand/247/2477304.js
  [utils.l10n][debug] Language code: de_DE
  error: Unable to open URL: https://b'' (HTTPSConnectionPool(host="b''", port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001BAE8276108>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')))
  
  
  Linux:
  
  streamlink  https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html   "best"  --loglevel debug
  [cli][info] Found matching plugin sportschau for URL https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html
  [plugin.sportschau][info] Found player js http://deviceids-medp.wdr.de/ondemand/247/2477304.js
  Traceback (most recent call last):
    File "/usr/bin/streamlink", line 11, in <module>
      load_entry_point('streamlink==0.10.0', 'console_scripts', 'streamlink')()
    File "/usr/share/streamlink/streamlink_cli/main.py", line 1055, in main
      handle_url()
    File "/usr/share/streamlink/streamlink_cli/main.py", line 486, in handle_url
      streams = fetch_streams(plugin)
    File "/usr/share/streamlink/streamlink_cli/main.py", line 398, in fetch_streams
      sorting_excludes=args.stream_sorting_excludes)
    File "/usr/lib/python3/dist-packages/streamlink/plugin/plugin.py", line 385, in get_streams
      return self.streams(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/streamlink/plugin/plugin.py", line 288, in streams
      ostreams = self._get_streams()
    File "/usr/lib/python3/dist-packages/streamlink/plugins/sportschau.py", line 40, in _get_streams
      return HDSStream.parse_manifest(self.session, stream_metadata['mediaResource']['dflt']['videoURL']).items()
  KeyError: 'videoURL'
  Error in sys.excepthook:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 145, in apport_excepthook
      os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
  FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_share_streamlink_streamlink.1000.crash'
  
  Original exception was:
  Traceback (most recent call last):
    File "/usr/bin/streamlink", line 11, in <module>
      load_entry_point('streamlink==0.10.0', 'console_scripts', 'streamlink')()
    File "/usr/share/streamlink/streamlink_cli/main.py", line 1055, in main
      handle_url()
  ```
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/streamlink/plugins/sportschau.py`
  Content:
  ```
  1 import logging
  2 import re
  3 
  4 from streamlink.plugin import Plugin, pluginmatcher
  5 from streamlink.plugin.api import validate
  6 from streamlink.stream import HLSStream
  7 from streamlink.utils import parse_json, update_scheme
  8 
  9 log = logging.getLogger(__name__)
  10 
  11 
  12 @pluginmatcher(re.compile(
  13     r"https?://(?:\w+\.)*sportschau\.de/"
  14 ))
  15 class Sportschau(Plugin):
  16     _re_player = re.compile(r"https?:(//deviceids-medp.wdr.de/ondemand/\S+\.js)")
  17     _re_json = re.compile(r"\$mediaObject.jsonpHelper.storeAndPlay\(({.+})\);?")
  18 
  19     _schema_player = validate.Schema(
  20         validate.transform(_re_player.search),
  21         validate.any(None, validate.Schema(
  22             validate.get(1),
  23             validate.transform(lambda url: update_scheme("https:", url))
  24         ))
  25     )
  26     _schema_json = validate.Schema(
  27         validate.transform(_re_json.match),
  28         validate.get(1),
  29         validate.transform(parse_json),
  30         validate.get("mediaResource"),
  31         validate.get("dflt"),
  32         validate.get("videoURL"),
  33         validate.transform(lambda url: update_scheme("https:", url))
  34     )
  35 
  36     def _get_streams(self):
  37         player_js = self.session.http.get(self.url, schema=self._schema_player)
  38         if not player_js:
  39             return
  40 
  41         log.debug("Found player js {0}".format(player_js))
  42 
  43         hls_url = self.session.http.get(player_js, schema=self._schema_json)
  44 
  45         yield from HLSStream.parse_variant_playlist(self.session, hls_url).items()
  46 
  47 
  48 __plugin__ = Sportschau
  49
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/src/streamlink/plugins/sportschau.py b/src/streamlink/plugins/sportschau.py
  --- a/src/streamlink/plugins/sportschau.py
  +++ b/src/streamlink/plugins/sportschau.py
  @@ -3,7 +3,7 @@
   
   from streamlink.plugin import Plugin, pluginmatcher
   from streamlink.plugin.api import validate
  -from streamlink.stream import HLSStream
  +from streamlink.stream import HLSStream, HTTPStream
   from streamlink.utils import parse_json, update_scheme
   
   log = logging.getLogger(__name__)
  @@ -16,33 +16,34 @@
       _re_player = re.compile(r"https?:(//deviceids-medp.wdr.de/ondemand/\S+\.js)")
       _re_json = re.compile(r"\$mediaObject.jsonpHelper.storeAndPlay\(({.+})\);?")
   
  -    _schema_player = validate.Schema(
  -        validate.transform(_re_player.search),
  -        validate.any(None, validate.Schema(
  -            validate.get(1),
  -            validate.transform(lambda url: update_scheme("https:", url))
  -        ))
  -    )
  -    _schema_json = validate.Schema(
  -        validate.transform(_re_json.match),
  -        validate.get(1),
  -        validate.transform(parse_json),
  -        validate.get("mediaResource"),
  -        validate.get("dflt"),
  -        validate.get("videoURL"),
  -        validate.transform(lambda url: update_scheme("https:", url))
  -    )
  -
       def _get_streams(self):
  -        player_js = self.session.http.get(self.url, schema=self._schema_player)
  +        player_js = self.session.http.get(self.url, schema=validate.Schema(
  +            validate.transform(self._re_player.search),
  +            validate.any(None, validate.Schema(
  +                validate.get(1),
  +                validate.transform(lambda url: update_scheme("https:", url))
  +            ))
  +        ))
           if not player_js:
               return
   
  -        log.debug("Found player js {0}".format(player_js))
  -
  -        hls_url = self.session.http.get(player_js, schema=self._schema_json)
  +        log.debug(f"Found player js {player_js}")
  +        data = self.session.http.get(player_js, schema=validate.Schema(
  +            validate.transform(self._re_json.match),
  +            validate.get(1),
  +            validate.transform(parse_json),
  +            validate.get("mediaResource"),
  +            validate.get("dflt"),
  +            {
  +                validate.optional("audioURL"): validate.url(),
  +                validate.optional("videoURL"): validate.url()
  +            }
  +        ))
   
  -        yield from HLSStream.parse_variant_playlist(self.session, hls_url).items()
  +        if data.get("videoURL"):
  +            yield from HLSStream.parse_variant_playlist(self.session, update_scheme("https:", data.get("videoURL"))).items()
  +        if data.get("audioURL"):
  +            yield "audio", HTTPStream(self.session, update_scheme("https:", data.get("audioURL")))
   
   
   __plugin__ = Sportschau
  
verification_info: {"golden_diff": "diff --git a/src/streamlink/plugins/sportschau.py b/src/streamlink/plugins/sportschau.py\n--- a/src/streamlink/plugins/sportschau.py\n+++ b/src/streamlink/plugins/sportschau.py\n@@ -3,7 +3,7 @@\n \n from streamlink.plugin import Plugin, pluginmatcher\n from streamlink.plugin.api import validate\n-from streamlink.stream import HLSStream\n+from streamlink.stream import HLSStream, HTTPStream\n from streamlink.utils import parse_json, update_scheme\n \n log = logging.getLogger(__name__)\n@@ -16,33 +16,34 @@\n     _re_player = re.compile(r\"https?:(//deviceids-medp.wdr.de/ondemand/\\S+\\.js)\")\n     _re_json = re.compile(r\"\\$mediaObject.jsonpHelper.storeAndPlay\\(({.+})\\);?\")\n \n-    _schema_player = validate.Schema(\n-        validate.transform(_re_player.search),\n-        validate.any(None, validate.Schema(\n-            validate.get(1),\n-            validate.transform(lambda url: update_scheme(\"https:\", url))\n-        ))\n-    )\n-    _schema_json = validate.Schema(\n-        validate.transform(_re_json.match),\n-        validate.get(1),\n-        validate.transform(parse_json),\n-        validate.get(\"mediaResource\"),\n-        validate.get(\"dflt\"),\n-        validate.get(\"videoURL\"),\n-        validate.transform(lambda url: update_scheme(\"https:\", url))\n-    )\n-\n     def _get_streams(self):\n-        player_js = self.session.http.get(self.url, schema=self._schema_player)\n+        player_js = self.session.http.get(self.url, schema=validate.Schema(\n+            validate.transform(self._re_player.search),\n+            validate.any(None, validate.Schema(\n+                validate.get(1),\n+                validate.transform(lambda url: update_scheme(\"https:\", url))\n+            ))\n+        ))\n         if not player_js:\n             return\n \n-        log.debug(\"Found player js {0}\".format(player_js))\n-\n-        hls_url = self.session.http.get(player_js, schema=self._schema_json)\n+        log.debug(f\"Found player js {player_js}\")\n+        data = self.session.http.get(player_js, schema=validate.Schema(\n+            validate.transform(self._re_json.match),\n+            validate.get(1),\n+            validate.transform(parse_json),\n+            validate.get(\"mediaResource\"),\n+            validate.get(\"dflt\"),\n+            {\n+                validate.optional(\"audioURL\"): validate.url(),\n+                validate.optional(\"videoURL\"): validate.url()\n+            }\n+        ))\n \n-        yield from HLSStream.parse_variant_playlist(self.session, hls_url).items()\n+        if data.get(\"videoURL\"):\n+            yield from HLSStream.parse_variant_playlist(self.session, update_scheme(\"https:\", data.get(\"videoURL\"))).items()\n+        if data.get(\"audioURL\"):\n+            yield \"audio\", HTTPStream(self.session, update_scheme(\"https:\", data.get(\"audioURL\")))\n \n \n __plugin__ = Sportschau\n", "issue": "sportschau: Does not work with the newly introduced bundesliga livestreams (Konferenz)\n### Checklist\n\n- [X] This is a plugin issue and not a different kind of issue\n- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)\n- [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)\n- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)\n\n### Streamlink version\n\nLatest stable release\n\n### Description\n\nDoes not work with the newly introduced bundesliga livestreams (Konferenz).\r\n\r\ne.g. https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html\r\n\r\nNeither under windows nor linux. The linux version (Mint 19) was installed with apt-get, maybe is an older version.\r\nWindows version is actual.\r\n\r\n\n\n### Debug log\n\n```text\nWindows:\r\n\r\nc:\\Users\\deiss\\Downloads\\streamlink>streamlink  https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html   \"best\"  --loglevel debug\r\n[cli][debug] OS:         Windows 10\r\n[cli][debug] Python:     3.7.9\r\n[cli][debug] Streamlink: 2.1.2\r\n[cli][debug] Requests(2.25.1), Socks(1.7.1), Websocket(1.0.0)\r\n[cli][debug] Arguments:\r\n[cli][debug]  url=https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html\r\n[cli][debug]  stream=['best']\r\n[cli][debug]  --config=['c:\\\\Users\\\\deiss\\\\Downloads\\\\streamlink\\\\\\\\streamlinkrc']\r\n[cli][debug]  --loglevel=debug\r\n[cli][debug]  --rtmp-rtmpdump=c:\\Users\\deiss\\Downloads\\streamlink\\\\rtmpdump\\rtmpdump.exe\r\n[cli][debug]  --ffmpeg-ffmpeg=c:\\Users\\deiss\\Downloads\\streamlink\\\\ffmpeg\\ffmpeg.exe\r\n[cli][info] Found matching plugin sportschau for URL https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html\r\n[plugins.sportschau][debug] Found player js https://deviceids-medp.wdr.de/ondemand/247/2477304.js\r\n[utils.l10n][debug] Language code: de_DE\r\nerror: Unable to open URL: https://b'' (HTTPSConnectionPool(host=\"b''\", port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001BAE8276108>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')))\r\n\r\n\r\nLinux:\r\n\r\nstreamlink  https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html   \"best\"  --loglevel debug\r\n[cli][info] Found matching plugin sportschau for URL https://www.sportschau.de/fussball/bundesliga/audiostream-die-konferenz---bundesliga-live-100.html\r\n[plugin.sportschau][info] Found player js http://deviceids-medp.wdr.de/ondemand/247/2477304.js\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/streamlink\", line 11, in <module>\r\n    load_entry_point('streamlink==0.10.0', 'console_scripts', 'streamlink')()\r\n  File \"/usr/share/streamlink/streamlink_cli/main.py\", line 1055, in main\r\n    handle_url()\r\n  File \"/usr/share/streamlink/streamlink_cli/main.py\", line 486, in handle_url\r\n    streams = fetch_streams(plugin)\r\n  File \"/usr/share/streamlink/streamlink_cli/main.py\", line 398, in fetch_streams\r\n    sorting_excludes=args.stream_sorting_excludes)\r\n  File \"/usr/lib/python3/dist-packages/streamlink/plugin/plugin.py\", line 385, in get_streams\r\n    return self.streams(*args, **kwargs)\r\n  File \"/usr/lib/python3/dist-packages/streamlink/plugin/plugin.py\", line 288, in streams\r\n    ostreams = self._get_streams()\r\n  File \"/usr/lib/python3/dist-packages/streamlink/plugins/sportschau.py\", line 40, in _get_streams\r\n    return HDSStream.parse_manifest(self.session, stream_metadata['mediaResource']['dflt']['videoURL']).items()\r\nKeyError: 'videoURL'\r\nError in sys.excepthook:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3/dist-packages/apport_python_hook.py\", line 145, in apport_excepthook\r\n    os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:\r\nFileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_share_streamlink_streamlink.1000.crash'\r\n\r\nOriginal exception was:\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/streamlink\", line 11, in <module>\r\n    load_entry_point('streamlink==0.10.0', 'console_scripts', 'streamlink')()\r\n  File \"/usr/share/streamlink/streamlink_cli/main.py\", line 1055, in main\r\n    handle_url()\n```\n\n", "before_files": [{"content": "import logging\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream\nfrom streamlink.utils import parse_json, update_scheme\n\nlog = logging.getLogger(__name__)\n\n\n@pluginmatcher(re.compile(\n    r\"https?://(?:\\w+\\.)*sportschau\\.de/\"\n))\nclass Sportschau(Plugin):\n    _re_player = re.compile(r\"https?:(//deviceids-medp.wdr.de/ondemand/\\S+\\.js)\")\n    _re_json = re.compile(r\"\\$mediaObject.jsonpHelper.storeAndPlay\\(({.+})\\);?\")\n\n    _schema_player = validate.Schema(\n        validate.transform(_re_player.search),\n        validate.any(None, validate.Schema(\n            validate.get(1),\n            validate.transform(lambda url: update_scheme(\"https:\", url))\n        ))\n    )\n    _schema_json = validate.Schema(\n        validate.transform(_re_json.match),\n        validate.get(1),\n        validate.transform(parse_json),\n        validate.get(\"mediaResource\"),\n        validate.get(\"dflt\"),\n        validate.get(\"videoURL\"),\n        validate.transform(lambda url: update_scheme(\"https:\", url))\n    )\n\n    def _get_streams(self):\n        player_js = self.session.http.get(self.url, schema=self._schema_player)\n        if not player_js:\n            return\n\n        log.debug(\"Found player js {0}\".format(player_js))\n\n        hls_url = self.session.http.get(player_js, schema=self._schema_json)\n\n        yield from HLSStream.parse_variant_playlist(self.session, hls_url).items()\n\n\n__plugin__ = Sportschau\n", "path": "src/streamlink/plugins/sportschau.py"}], "after_files": [{"content": "import logging\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream, HTTPStream\nfrom streamlink.utils import parse_json, update_scheme\n\nlog = logging.getLogger(__name__)\n\n\n@pluginmatcher(re.compile(\n    r\"https?://(?:\\w+\\.)*sportschau\\.de/\"\n))\nclass Sportschau(Plugin):\n    _re_player = re.compile(r\"https?:(//deviceids-medp.wdr.de/ondemand/\\S+\\.js)\")\n    _re_json = re.compile(r\"\\$mediaObject.jsonpHelper.storeAndPlay\\(({.+})\\);?\")\n\n    def _get_streams(self):\n        player_js = self.session.http.get(self.url, schema=validate.Schema(\n            validate.transform(self._re_player.search),\n            validate.any(None, validate.Schema(\n                validate.get(1),\n                validate.transform(lambda url: update_scheme(\"https:\", url))\n            ))\n        ))\n        if not player_js:\n            return\n\n        log.debug(f\"Found player js {player_js}\")\n        data = self.session.http.get(player_js, schema=validate.Schema(\n            validate.transform(self._re_json.match),\n            validate.get(1),\n            validate.transform(parse_json),\n            validate.get(\"mediaResource\"),\n            validate.get(\"dflt\"),\n            {\n                validate.optional(\"audioURL\"): validate.url(),\n                validate.optional(\"videoURL\"): validate.url()\n            }\n        ))\n\n        if data.get(\"videoURL\"):\n            yield from HLSStream.parse_variant_playlist(self.session, update_scheme(\"https:\", data.get(\"videoURL\"))).items()\n        if data.get(\"audioURL\"):\n            yield \"audio\", HTTPStream(self.session, update_scheme(\"https:\", data.get(\"audioURL\")))\n\n\n__plugin__ = Sportschau\n", "path": "src/streamlink/plugins/sportschau.py"}]}