Skip to content

plugins.pluzz: refactor, upd API URL, fix schemas #6048

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
Jun 23, 2024

Conversation

bastimeyer
Copy link
Member

  • Split into separate matchers for each supported site
  • Update API URL
  • Fix video ID validation schema
  • Fix token URL validation schema
  • Remove unnecessary update_qsd() calls

Resolves #6047

@uNouss please check if something's not working correctly that's not covered by the test URLs
https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback

$ HTTPS_PROXY=socks5h://localhost:1920 ./script/test-plugin-urls.py pluzz
:: Finding streams for URL: https://france3-regions.francetvinfo.fr/bourgogne-franche-comte/direct/franche-comte
:: Found streams: 216p, 360p, 540p, 720p, worst, best
:: Finding streams for URL: https://la1ere.francetvinfo.fr/info-en-continu-24-24
:: Found streams: 144p, 216p, 360p, 540p, 720p, 1080p, worst, best
:: Finding streams for URL: https://la1ere.francetvinfo.fr/programme-video/france-3_outremer-ledoc/diffusion/2958951-polynesie-les-sages-de-l-ocean.html
:: Found streams: 216p, 360p, 540p, 720p, worst, best
:: Finding streams for URL: https://www.france.tv/france-2/direct.html
:: Found streams: 144p, 216p, 360p, 540p, 720p, 1080p, worst, best
:: Finding streams for URL: https://www.france.tv/france-2/journal-20h00/141003-edition-du-lundi-8-mai-2017.html
:: Found streams: 144p, 180p, 288p, 396p, 576p, worst, best
:: Finding streams for URL: https://www.france.tv/france-3/direct.html
:: Found streams: 144p, 216p, 360p, 540p, 720p, 1080p, worst, best
:: Finding streams for URL: https://www.france.tv/france-4/direct.html
:: Found streams: 144p, 216p, 360p, 540p, 720p, 1080p, worst, best
:: Finding streams for URL: https://www.france.tv/france-5/direct.html
:: Found streams: 144p, 216p, 360p, 540p, 720p, 1080p, worst, best
:: Finding streams for URL: https://www.france.tv/franceinfo/direct.html
:: Found streams: 144p, 216p, 360p, 540p, 720p, 1080p, worst, best
:: Finding streams for URL: https://www.francetvinfo.fr/en-direct/tv.html
:: Found streams: 144p, 216p, 360p, 540p, 720p, 1080p, worst, best
:: Finding streams for URL: https://www.francetvinfo.fr/meteo/orages/inondations-dans-le-gard-plus-de-deux-mois-de-pluie-en-quelques-heures-des-degats-mais-pas-de-victime_4771265.html
:: Found streams: 216p, 360p, 540p, 720p, worst, best

The error message when being geo-blocked isn't ideal, but I don't care...

$ streamlink https://www.france.tv/france-2/direct.html
[cli][info] Found matching plugin pluzz for URL https://www.france.tv/france-2/direct.html
error: Unable to open URL: https://k7.ftven.fr/videos/006194ea-117d-4bcf-94a9-153d999c59ae (422 Client Error: Unprocessable Entity for url: https://k7.ftven.fr/videos/006194ea-117d-4bcf-94a9-153d999c59ae?country_code=DE&w=1920&h=1080&player_version=5.51.35&domain=www.france.tv&device_type=mobile&browser=chrome&browser_version=125&os=ios&gmt=%2B0200)

The new API response contains two different token URL for getting the HLS/DASH stream URLs, dai and akamai. The dai one didn't seem to work, and the regular TV live streams (didn't check anything else) were using akamai, so I went with that. No idea if a fallback to dai might be required in the future. For now it's simply ignored...

Also probably worth mentioning is that the website requires a login, because the initial JSON payload with the video-ID has this property set: "isLoginRequired": true. Their API doesn't seem to care though.

- Split into separate matchers for each supported site
- Update API URL
- Fix video ID validation schema
- Fix token URL validation schema
- Remove unnecessary `update_qsd()` calls
@bastimeyer bastimeyer added plugin issue A Plugin does not work correctly restriction: geo blocked labels Jun 22, 2024
@uNouss
Copy link

uNouss commented Jun 23, 2024

this revision #6048 fix the issue #6047

@bastimeyer bastimeyer merged commit d4b2945 into streamlink:master Jun 23, 2024
23 checks passed
@bastimeyer bastimeyer deleted the plugins/pluzz/fix-6047 branch June 23, 2024 15:59
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 restriction: geo blocked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugins.pluzz: live or replay from francetv doesn't work anymore
3 participants