Skip to content

plugins.goodgame: rewrite and fix plugin #5557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

bastimeyer
Copy link
Member

@bastimeyer bastimeyer commented Sep 15, 2023

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)

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Sep 15, 2023
@bastimeyer bastimeyer force-pushed the plugins/goodgame/rewrite branch 2 times, most recently from fdb7a24 to b60413a Compare September 15, 2023 20:58
@StasYong
Copy link

With the edited plugin, the error has been fixed, thnx

[cli][debug] OS: Windows 10
[cli][debug] Python: 3.11.5
[cli][debug] OpenSSL: OpenSSL 3.0.9 30 May 2023
[cli][debug] Streamlink: 6.2.0
[cli][debug] Dependencies:
[cli][debug] certifi: 2023.7.22
[cli][debug] isodate: 0.6.1
[cli][debug] lxml: 4.9.3
[cli][debug] pycountry: 22.3.5
[cli][debug] pycryptodome: 3.18.0
[cli][debug] PySocks: 1.7.1
[cli][debug] requests: 2.31.0
[cli][debug] trio: 0.22.2
[cli][debug] trio-websocket: 0.10.4
[cli][debug] typing-extensions: 4.7.1
[cli][debug] urllib3: 2.0.4
[cli][debug] websocket-client: 1.6.3
[cli][debug] Arguments:
[cli][debug] url=https://goodgame.ru/Roper89
[cli][debug] stream=['best']
[cli][debug] --loglevel=debug
[cli][debug] --player=c:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe
[cli][debug] --ffmpeg-ffmpeg=C:\Soft\Streamlink\ffmpeg\ffmpeg.exe
[cli][info] Found matching plugin goodgame for URL https://goodgame.ru/Roper89
[cli][info] Available streams: 240p (worst), 480p, 720p, source (best)
[cli][info] Opening stream: source (hls)
[cli][info] Starting player: c:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] First Sequence: 5957; Last Sequence: 5960
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 5958; End Sequence: None
[stream.hls][debug] Adding segment 5958 to queue
[stream.hls][debug] Adding segment 5959 to queue
[stream.hls][debug] Adding segment 5960 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Writing segment 5958 to output
[stream.hls][debug] Segment 5958 complete
[cli.output][debug] Opening subprocess: ['c:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe', '-']
[cli][debug] Writing stream to output
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 5961 to queue
[stream.hls][debug] Writing segment 5959 to output
[stream.hls][debug] Segment 5959 complete
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 5962 to queue
[stream.hls][debug] Writing segment 5960 to output
[stream.hls][debug] Segment 5960 complete
[cli][info] Player closed
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][info] Stream ended
[cli][info] Closing currently open stream...

@bastimeyer bastimeyer force-pushed the plugins/goodgame/rewrite branch from b60413a to 2ef8779 Compare September 16, 2023 12:42
@bastimeyer bastimeyer merged commit 97b5e18 into streamlink:master Sep 16, 2023
@bastimeyer bastimeyer deleted the plugins/goodgame/rewrite branch September 16, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin issue A Plugin does not work correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugins.goodgame: Unable to parse JSON: Expecting ','
3 participants