Repository: streamlink/streamlink

Issue:
Goodgame plugin not worked.
<!--
Thanks for reporting a plugin issue!
USE THE TEMPLATE. Otherwise your plugin issue may be rejected.

First, see the contribution guidelines:
https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink

Also check the list of open and closed plugin issues:
https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22

Please see the text preview to avoid unnecessary formatting errors.
-->


## Plugin Issue

<!-- Replace [ ] with [x] in order to check the box -->
- [x] This is a plugin issue and I have read the contribution guidelines.


### Description

<!-- Explain the plugin issue as thoroughly as you can. -->
It looks like the plugin can no longer open streams.

### Reproduction steps / Explicit stream URLs to test
https://goodgame.ru/channel/Miker/#autoplay
<!-- How can we reproduce this? Please note the exact steps below using the list format supplied. If you need more steps please add them. -->

1. ...
2. ...
3. ...


### Log output

<!--
TEXT LOG OUTPUT IS REQUIRED for a plugin issue!
Use the `--loglevel debug` parameter and avoid using parameters which suppress log output.
https://streamlink.github.io/cli.html#cmdoption-l

Make sure to **remove usernames and passwords**
You can copy the output to https://gist.github.com/ or paste it below.
-->

```
REPLACE THIS TEXT WITH THE LOG OUTPUT
```
c:\>streamlink --loglevel debug https://goodgame.ru/channel/Miker/#autoplay best
[cli][debug] OS:         Windows 7
[cli][debug] Python:     3.6.6
[cli][debug] Streamlink: 1.1.1
[cli][debug] Requests(2.21.0), Socks(1.6.7), Websocket(0.56.0)
[cli][info] Found matching plugin goodgame for URL https://goodgame.ru/channel/Miker/#autoplay
Traceback (most recent call last):
  File "runpy.py", line 193, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Program Files (x86)\Streamlink\bin\streamlink.exe\__main__.py", line 18, in <module>
  File "C:\Program Files (x86)\Streamlink\pkgs\streamlink_cli\main.py", line 1033, in main
    handle_url()
  File "C:\Program Files (x86)\Streamlink\pkgs\streamlink_cli\main.py", line 577, in handle_url
    streams = fetch_streams(plugin)
  File "C:\Program Files (x86)\Streamlink\pkgs\streamlink_cli\main.py", line 457, in fetch_streams
    sorting_excludes=args.stream_sorting_excludes)
  File "C:\Program Files (x86)\Streamlink\pkgs\streamlink\plugin\plugin.py", line 317, in streams
    ostreams = self._get_streams()
  File "C:\Program Files (x86)\Streamlink\pkgs\streamlink\plugins\goodgame.py", line 49, in _get_str
eams
    **channel_info)
  File "logging\__init__.py", line 1295, in debug
TypeError: _log() got an unexpected keyword argument 'id'

### Additional comments, screenshots, etc.



[Love Streamlink? Please consider supporting our collective. Thanks!](https://opencollective.com/streamlink/donate)



Discussion:
> --loglevel debug

this returns invalid data, use `--loglevel info`, it should work
Yes, it really works without this command. I used it in most of my bat files.

Resolving patch:
diff --git a/src/streamlink/plugins/goodgame.py b/src/streamlink/plugins/goodgame.py
--- a/src/streamlink/plugins/goodgame.py
+++ b/src/streamlink/plugins/goodgame.py
@@ -1,9 +1,12 @@
 import re
+import logging
 
 from streamlink.plugin import Plugin
 from streamlink.stream import HLSStream
 from streamlink.utils import parse_json
 
+log = logging.getLogger(__name__)
+
 HLS_URL_FORMAT = "https://hls.goodgame.ru/hls/{0}{1}.m3u8"
 QUALITIES = {
     "1080p": "",
@@ -35,7 +38,7 @@ def _get_streams(self):
 
         match = _ddos_re.search(res.text)
         if match:
-            self.logger.debug("Anti-DDOS bypass...")
+            log.debug("Anti-DDOS bypass...")
             headers["Cookie"] = match.group(1)
             res = self.session.http.get(self.url, headers=headers)
 
@@ -45,10 +48,9 @@ def _get_streams(self):
             self.logger.error("Could not find channel info")
             return
 
-        self.logger.debug("Found channel info: channelkey={channelkey} pid={streamkey} online={status}",
-                          **channel_info)
+        log.debug("Found channel info: id={id} channelkey={channelkey} pid={streamkey} online={status}".format(**channel_info))
         if not channel_info['status']:
-            self.logger.debug("Channel appears to be offline")
+            log.debug("Channel appears to be offline")
 
         streams = {}
         for name, url_suffix in QUALITIES.items():


Test patch: