Skip to content

plugins.pandalive: fix user_id, update matcher #6433

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

Conversation

bastimeyer
Copy link
Member

Fixes #6432

@KOONWHITE @lloyd18
Please check and see if some streams are not working correctly. My local tests appeared fine, but I only checked one stream I picked randomly while using my local German IP address.
https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback

When requesting the input URL, their servers return an HTTP 500 status. That's also the case in your web browser, btw. Since extracting the user/channel ID from the HTML page which the previous plugin implementation did was already a bit questionable, the simple fix was to request it from their API instead.

$ ./script/test-plugin-urls.py pandalive -r CHANNEL flowerwar
:: https://w2.pandalive.co.kr/en/play/flowerwar
:::: Broadcast type: live
::  160p, 360p, 480p, 720p60, 1080p60, worst, best
:: https://www.pandalive.co.kr/live/play/flowerwar
:::: Broadcast type: live
::  160p, 360p, 480p, 720p60, 1080p60, worst, best
$ streamlink -l debug --hls-duration=5 -o /dev/null https://www.pandalive.co.kr/live/play/flowerwar best
[cli][debug] OS:         Linux-6.13.1-1-git-x86_64-with-glibc2.41
[cli][debug] Python:     3.13.1
[cli][debug] OpenSSL:    OpenSSL 3.4.0 22 Oct 2024
[cli][debug] Streamlink: 7.1.2+27.g03dc6a04
[cli][debug] Dependencies:
[cli][debug]  certifi: 2025.1.31
[cli][debug]  isodate: 0.7.2
[cli][debug]  lxml: 5.3.0
[cli][debug]  pycountry: 24.6.1
[cli][debug]  pycryptodome: 3.21.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.32.3
[cli][debug]  trio: 0.28.0
[cli][debug]  trio-websocket: 0.11.1
[cli][debug]  urllib3: 2.3.0
[cli][debug]  websocket-client: 1.8.0
[cli][debug] Arguments:
[cli][debug]  url=https://www.pandalive.co.kr/live/play/flowerwar
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --player=/usr/bin/mpv
[cli][debug]  --output=/dev/null
[cli][debug]  --hls-duration=5.0
[cli][debug]  --webbrowser-headless=True
[cli][info] Found matching plugin pandalive for URL https://www.pandalive.co.kr/live/play/flowerwar
[plugins.pandalive][debug] user_id=24925015
[plugins.pandalive][info] Broadcast type: live
[utils.l10n][debug] Language code: en_US
[cli][info] Available streams: 160p (worst), 360p, 480p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[cli][info] Writing output to
/dev/null
[cli][debug] Checking file output
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] First Sequence: 12063; Last Sequence: 12076
[stream.hls][debug] Start offset: 0; Duration: 5; Start Sequence: 12074; End Sequence: None
[stream.hls][debug] Adding segment 12074 to queue
[stream.hls][debug] Adding segment 12075 to queue
[stream.hls][debug] Adding segment 12076 to queue
[stream.hls][info] Stopping stream early after 5
[stream.segmented][debug] Closing worker thread
[stream.hls][debug] Writing segment 12074 to output
[stream.hls][debug] Segment 12074 complete
[cli][debug] Writing stream to output
[stream.hls][debug] Writing segment 12075 to output
[stream.hls][debug] Segment 12075 complete
[stream.hls][debug] Writing segment 12076 to output
[stream.hls][debug] Segment 12076 complete
[stream.segmented][debug] Closing writer thread
[download] Written 6.03 MiB to /dev/null (0s)                                                                                                   
[cli][info] Stream ended
[cli][info] Closing currently open stream...

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Feb 11, 2025
@bastimeyer bastimeyer force-pushed the plugins/pandalive/channel-id branch from 03dc6a0 to 52d993a Compare February 11, 2025 13:46
@lloyd18
Copy link

lloyd18 commented Feb 11, 2025

no problem, plugin is working now. thanks.

@bastimeyer
Copy link
Member Author

The reason why I'm always asking for feedback is that those users who've reported the issue should go ahead and check the updated plugin with input URLs that I didn't or couldn't check myself, because in 99% of the cases I don't use any of these sites and I'm not familiar with them. What about offline channels, or anything else that could prevent access, like locked streams, etc.? Just saying "it works" doesn't mean anything if you don't post a debug log.

@lloyd18
Copy link

lloyd18 commented Feb 12, 2025

Sometimes it reports a 403 error, but sometimes it's normal

root@BH:~# streamlink -l debug -o /dev/null https://www.pandalive.co.kr/live/play/tjfflddl7 best
[cli][info] streamlink is running as root! Be careful!
[cli][debug] OS:         Linux-6.1.0-28-amd64-x86_64-with-glibc2.36
[cli][debug] Python:     3.10.0
[cli][debug] OpenSSL:    OpenSSL 3.0.15 3 Sep 2024
[cli][debug] Streamlink: 6.8.1
[cli][debug] Dependencies:
[cli][debug]  certifi: 2025.1.31
[cli][debug]  isodate: 0.7.2
[cli][debug]  lxml: 5.3.1
[cli][debug]  pycountry: 24.6.1
[cli][debug]  pycryptodome: 3.21.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.32.3
[cli][debug]  trio: 0.28.0
[cli][debug]  trio-websocket: 0.11.1
[cli][debug]  typing-extensions: 4.12.2
[cli][debug]  urllib3: 2.3.0
[cli][debug]  websocket-client: 1.8.0
[cli][debug]  exceptiongroup: 1.2.2
[cli][debug] Arguments:
[cli][debug]  url=https://www.pandalive.co.kr/live/play/tjfflddl7
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --output=/dev/null
[cli][info] Found matching plugin pandalive for URL https://www.pandalive.co.kr/live/play/tjfflddl7
[plugins.pandalive][debug] user_id=24739904
[plugins.pandalive][info] Broadcast type: live
[utils.l10n][debug] Language code: en_US
error: Unable to open URL: https://ffdced10e5f6.us-west-2.playback.live-video.net/api/video/v1/us-west-2.583162646.channel.1WilnqP2iXF5.m3u8?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzM4NCJ9.eyJhd3M6Y2hhbm5lbC1hcm4iOiJhcm46YXdzOml2czp1cy13ZXN0LTI6NjU4NTgzMTYyNjQ2OmNoYW5uZWxcLzFXaWxucVAyaVhGNSIsImF3czpzaW5nbGUtdXNlLXV1aWQiOiIxQkM0NDc4RS04MUVGLTQwODYtQTZBRi1FQzJCMjBGOERERDIiLCJhd3M6dmlld2VyLWlkIjoiMjI3MjEzMzUiLCJhd3M6dmlld2VyLXNlc3Npb24tdmVyc2lvbiI6MTczOTM0OTg4OCwiZXhwIjoxNzM5MzUwNDg4LCJhd3M6YWNjZXNzLWNvbnRyb2wtYWxsb3ctb3JpZ2luIjoiaHR0cHM6XC9cLyoucGFuZGFsaXZlLmNvLmtyIiwiYXdzOnN0cmljdC1vcmlnaW4tZW5mb3JjZW1lbnQiOnRydWUsInQiOjB9.STqUWDYsVuRy4njac0tWamWaR2snsepAPLBb79yBdjhGUcJfkqz6qyCq-8I9zmKFhbMLbQLgtRHX-ofhx7lwB7339xb38Z8GNKq9DZCATzlNrVnA5LExjfIBmYYOsPYR (403 Client Error: Forbidden for url: https://ffdced10e5f6.us-west-2.playback.live-video.net/api/video/v1/us-west-2.583162646.channel.1WilnqP2iXF5.m3u8?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzM4NCJ9.eyJhd3M6Y2hhbm5lbC1hcm4iOiJhcm46YXdzOml2czp1cy13ZXN0LTI6NjU4NTgzMTYyNjQ2OmNoYW5uZWxcLzFXaWxucVAyaVhGNSIsImF3czpzaW5nbGUtdXNlLXV1aWQiOiIxQkM0NDc4RS04MUVGLTQwODYtQTZBRi1FQzJCMjBGOERERDIiLCJhd3M6dmlld2VyLWlkIjoiMjI3MjEzMzUiLCJhd3M6dmlld2VyLXNlc3Npb24tdmVyc2lvbiI6MTczOTM0OTg4OCwiZXhwIjoxNzM5MzUwNDg4LCJhd3M6YWNjZXNzLWNvbnRyb2wtYWxsb3ctb3JpZ2luIjoiaHR0cHM6XC9cLyoucGFuZGFsaXZlLmNvLmtyIiwiYXdzOnN0cmljdC1vcmlnaW4tZW5mb3JjZW1lbnQiOnRydWUsInQiOjB9.STqUWDYsVuRy4njac0tWamWaR2snsepAPLBb79yBdjhGUcJfkqz6qyCq-8I9zmKFhbMLbQLgtRHX-ofhx7lwB7339xb38Z8GNKq9DZCATzlNrVnA5LExjfIBmYYOsPYR)
root@BH:~# streamlink -l debug -o /dev/null https://www.pandalive.co.kr/live/play/tjfflddl7 best
[cli][info] streamlink is running as root! Be careful!
[cli][debug] OS:         Linux-6.1.0-28-amd64-x86_64-with-glibc2.36
[cli][debug] Python:     3.10.0
[cli][debug] OpenSSL:    OpenSSL 3.0.15 3 Sep 2024
[cli][debug] Streamlink: 6.8.1
[cli][debug] Dependencies:
[cli][debug]  certifi: 2025.1.31
[cli][debug]  isodate: 0.7.2
[cli][debug]  lxml: 5.3.1
[cli][debug]  pycountry: 24.6.1
[cli][debug]  pycryptodome: 3.21.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.32.3
[cli][debug]  trio: 0.28.0
[cli][debug]  trio-websocket: 0.11.1
[cli][debug]  typing-extensions: 4.12.2
[cli][debug]  urllib3: 2.3.0
[cli][debug]  websocket-client: 1.8.0
[cli][debug]  exceptiongroup: 1.2.2
[cli][debug] Arguments:
[cli][debug]  url=https://www.pandalive.co.kr/live/play/tjfflddl7
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --output=/dev/null
[cli][info] Found matching plugin pandalive for URL https://www.pandalive.co.kr/live/play/tjfflddl7
[plugins.pandalive][debug] user_id=24739904
[plugins.pandalive][info] Broadcast type: live
[utils.l10n][debug] Language code: en_US
[cli][info] Available streams: 160p (worst), 360p, 480p, 720p, 1080p (best)
[cli][info] Opening stream: 1080p (hls)
[cli][info] Writing output to
/dev/null
[cli][debug] Checking file output
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] First Sequence: 8014; Last Sequence: 8027
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 8025; End Sequence: None
[stream.hls][debug] Adding segment 8025 to queue
[stream.hls][debug] Adding segment 8026 to queue
[stream.hls][debug] Adding segment 8027 to queue

@bastimeyer
Copy link
Member Author

[cli][debug] Streamlink: 6.8.1

This is a Frankenstein Streamlink install you're using. You are not supposed to overwrite any files in an old version, especially plugin files. The proper way of installing from a PR is documented in the PR feedback docs linked above, as well as in Streamlink's full docs. Any log outputs of those modified versions are meaningless and thus not helpful.

The 403 HTTP response in your logs comes from trying to access the resolved HLS playlist URL. I don't see any issues of that kind when checking streams in an infinite loop while using the latest unmodified version. All resolved HLS playlist URLs return a 200 status.

$ while streamlink https://www.pandalive.co.kr/live/play/queen486; do sleep 1; done
[cli][info] Found matching plugin pandalive for URL https://www.pandalive.co.kr/live/play/queen486
[plugins.pandalive][info] Broadcast type: live
Available streams: 160p (worst), 360p, 480p, 720p60, 1080p60 (best)
...
[cli][info] Found matching plugin pandalive for URL https://www.pandalive.co.kr/live/play/queen486
[plugins.pandalive][info] Broadcast type: live
Available streams: 160p (worst), 360p, 480p, 720p60, 1080p60 (best)
...
[cli][info] Found matching plugin pandalive for URL https://www.pandalive.co.kr/live/play/queen486
[plugins.pandalive][error] 너무 많은 요청이 발생했습니다. 잠시 후 다시 시도해주세요.
error: No playable streams found on this URL: https://www.pandalive.co.kr/live/play/queen486

I'm just going to merge this, even though I didn't receive the feedback that I was looking for. Thanks anyways...

@bastimeyer bastimeyer merged commit 9a80290 into streamlink:master Feb 12, 2025
23 checks passed
@bastimeyer bastimeyer deleted the plugins/pandalive/channel-id branch February 12, 2025 12:38
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.pandalive: 500 Server Error: Internal Server Error
2 participants