Fixes #5556
This rewrite doesn't include the old "DDOS protection" workaround, which accessed the site once, checked for document.cookie="..." and set the cookie before accessing it again. No idea if it's still required, but it doesn't seem like it is. As said, the current plugin implementation on master is really old.
@StasYong, please check if there are any problems left, thanks
https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback
live
$ streamlink 'https://goodgame.ru/channel/Nikichar' best
[cli][info] Found matching plugin goodgame for URL https://goodgame.ru/channel/Nikichar
[cli][info] Available streams: 240p (worst), 480p, 720p, source (best)
[cli][info] Opening stream: source (hls)
[cli][info] Starting player: mpv
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...
$ streamlink 'https://goodgame.ru/Nikichar' best
[cli][info] Found matching plugin goodgame for URL https://goodgame.ru/Nikichar
[cli][info] Available streams: 240p (worst), 480p, 720p, source (best)
[cli][info] Opening stream: source (hls)
[cli][info] Starting player: mpv
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...
metadata
$ streamlink goodgame.ru/channel/Pomi best -j | jq .metadata
{
"id": "1644",
"author": "Pomi",
"category": "StarCraft II: Legacy of the Void",
"title": "Stats vs Ragnarok (bo3) WardiTV KR Royale S2 - группа B (день #2)"
}
offline channel
$ streamlink 'https://goodgame.ru/BRAT_OK' best
[cli][info] Found matching plugin goodgame for URL https://goodgame.ru/BRAT_OK
error: No playable streams found on this URL: https://goodgame.ru/BRAT_OK
unknown channel
$ streamlink 'https://goodgame.ru/unknown' best
[cli][info] Found matching plugin goodgame for URL https://goodgame.ru/unknown
error: Unable to open URL: https://goodgame.ru/unknown (404 Client Error: not found for url: https://goodgame.ru/unknown)