Skip to content

plugins.pluzz: fix magneto player XPath query #5369

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

Conversation

bastimeyer
Copy link
Member

Fixes #5355

$ HTTPS_PROXY=socks5h://localhost:1920 python ./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

@Facy5 please check and see if anything else isn't working that I might have missed

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label May 31, 2023
@bastimeyer bastimeyer merged commit 9e05e32 into streamlink:master May 31, 2023
@bastimeyer bastimeyer deleted the plugins/pluzz/fix-xpath-magneto-player branch May 31, 2023 19:24
@Facy5
Copy link

Facy5 commented May 31, 2023

@bastimeyer Thanks to fix this bug.
I tried some VODs and lives across France TV websites (La 1ère la1ere.francetvinfo.fr, France TV Info francetvinfo.fr and France 3 regional channels france3-regions.francetvinfo.fr) : everything seems ok to me (see log below, just notice some strange lines before piping the stream in VLC but it might my fault to not setting correctly).

la1ere.francetvinfo.fr

PS C:\Users\Orion> streamlink --plugin-dir C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz https://la1ere.francetvinfo.fr/info-en-continu-24-24 best
[session][error] Failed to load plugin test_pluzz from C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz
Traceback (most recent call last):
  File "C:\Users\Orion\AppData\Local\Programs\Streamlink\pkgs\streamlink\session.py", line 638, in load_plugins
    mod = load_module(module_name, path)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Orion\AppData\Local\Programs\Streamlink\pkgs\streamlink\utils\module.py", line 14, in load_module
    spec.loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz\test_pluzz.py", line 2, in <module>
    from tests.plugins import PluginCanHandleUrl
ModuleNotFoundError: No module named 'tests'
[cli][info] Found matching plugin pluzz for URL https://la1ere.francetvinfo.fr/info-en-continu-24-24
[cli][info] Available streams: 144p (worst), 216p, 360p, 540p, 720p, 1080p (best)
[cli][info] Opening stream: 1080p (hls)
[cli][info] Starting player: "D:\Program Files\VideoLAN\VLC\vlc.exe" --file-caching=5000
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...

france3-regions.francetvinfo.fr

PS C:\Users\Orion> streamlink --plugin-dir C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz https://france3-regions.francetvinfo.fr/occitanie/direct/midi-pyrenees best
[session][error] Failed to load plugin test_pluzz from C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz
Traceback (most recent call last):
  File "C:\Users\Orion\AppData\Local\Programs\Streamlink\pkgs\streamlink\session.py", line 638, in load_plugins
    mod = load_module(module_name, path)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Orion\AppData\Local\Programs\Streamlink\pkgs\streamlink\utils\module.py", line 14, in load_module
    spec.loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz\test_pluzz.py", line 2, in <module>
    from tests.plugins import PluginCanHandleUrl
ModuleNotFoundError: No module named 'tests'
[cli][info] Found matching plugin pluzz for URL https://france3-regions.francetvinfo.fr/occitanie/direct/midi-pyrenees
[cli][info] Available streams: 216p (worst), 360p, 540p, 720p (best)
[cli][info] Opening stream: 720p (hls-multi)
[cli][info] Starting player: "D:\Program Files\VideoLAN\VLC\vlc.exe" --file-caching=5000
[utils.named_pipe][info] Creating pipe streamlinkpipe-56784-1-8676
[utils.named_pipe][info] Creating pipe streamlinkpipe-56784-2-3310
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...

I also check others France TV related (but not on the same name domain) in case they use the same player, and those two use it : Lumni : lumni.fr and Le monde des maternelles : lamaisondesmaternelles.fr
But I'm not sure if a French IP is needed for those two sites.

lumni.fr :

PS C:\Users\Orion> streamlink --plugin-dir C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz https://www.lumni.fr/video/c-est-quoi-roland-garros best
[session][error] Failed to load plugin test_pluzz from C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz
Traceback (most recent call last):
  File "C:\Users\Orion\AppData\Local\Programs\Streamlink\pkgs\streamlink\session.py", line 638, in load_plugins
    mod = load_module(module_name, path)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Orion\AppData\Local\Programs\Streamlink\pkgs\streamlink\utils\module.py", line 14, in load_module
    spec.loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz\test_pluzz.py", line 2, in <module>
    from tests.plugins import PluginCanHandleUrl
ModuleNotFoundError: No module named 'tests'
error: No plugin can handle URL: https://www.lumni.fr/video/c-est-quoi-roland-garros

lamaisondesmaternelle.fr

PS C:\Users\Orion> streamlink --plugin-dir C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz https://www.lamaisondesmaternelles.fr/article/jusqu-quel-age-doit-garder-le-biberon-la-nuit best
[session][error] Failed to load plugin test_pluzz from C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz
Traceback (most recent call last):
  File "C:\Users\Orion\AppData\Local\Programs\Streamlink\pkgs\streamlink\session.py", line 638, in load_plugins
    mod = load_module(module_name, path)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Orion\AppData\Local\Programs\Streamlink\pkgs\streamlink\utils\module.py", line 14, in load_module
    spec.loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz\test_pluzz.py", line 2, in <module>
    from tests.plugins import PluginCanHandleUrl
ModuleNotFoundError: No module named 'tests'
error: No plugin can handle URL: https://www.lamaisondesmaternelles.fr/article/jusqu-quel-age-doit-garder-le-biberon-la-nuit

@bastimeyer
Copy link
Member Author

File "C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz\test_pluzz.py", line 2, in <module>
    from tests.plugins import PluginCanHandleUrl
ModuleNotFoundError: No module named 'tests'

Why are you trying to side-load the plugin test file? This doesn't belong there and it has nothing to do with the actual plugin bugfixes.

Delete test_pluzz.py from your C:\Users\Orion\AppData\Roaming\streamlink\plugins\ directory.


https://streamlink.github.io/cli/plugin-sideloading.html

If one of the sideloaded plugins fails to load, eg. due to a SyntaxError being raised by the parser, this exception will not get caught by Streamlink and the execution will stop, even if the input stream URL does not match the faulty plugin.

@bastimeyer
Copy link
Member Author

I also check others France TV related

These are not supported by the plugin, as you can see here:
https://streamlink.github.io/plugins.html#pluzz

@Facy5
Copy link

Facy5 commented May 31, 2023

Oh sorry, so as I said, I was my fault 😅 (first time I sideload a plugin)
Now it's ok

PS C:\Users\Orion> streamlink --plugin-dir C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz https://la1ere.francetvinfo.fr/saintpierremiquelon/programme-video/la1ere_saint-pierre-et-miquelon_ca-vaut-le-detour/diffusion/4892719-emission-du-jeudi-18-mai-2023.html best
[cli][info] Found matching plugin pluzz for URL https://la1ere.francetvinfo.fr/saintpierremiquelon/programme-video/la1ere_saint-pierre-et-miquelon_ca-vaut-le-detour/diffusion/4892719-emission-du-jeudi-18-mai-2023.html
[cli][info] Available streams: 216p (worst), 360p, 540p, 720p, 1080p (best)
[cli][info] Opening stream: 1080p (hls-multi)
[cli][info] Starting player: "D:\Program Files\VideoLAN\VLC\vlc.exe" --file-caching=5000
[utils.named_pipe][info] Creating pipe streamlinkpipe-45616-1-8184
[utils.named_pipe][info] Creating pipe streamlinkpipe-45616-2-7404
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...

PS C:\Users\Orion> streamlink --plugin-dir C:\Users\Orion\AppData\Roaming\streamlink\plugins\pluzz https://la1ere.francetvinfo.fr/info-en-continu-24-24 best
[cli][info] Found matching plugin pluzz for URL https://la1ere.francetvinfo.fr/info-en-continu-24-24
[cli][info] Available streams: 144p (worst), 216p, 360p, 540p, 720p, 1080p (best)
[cli][info] Opening stream: 1080p (hls)
[cli][info] Starting player: "D:\Program Files\VideoLAN\VLC\vlc.exe" --file-caching=5000
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...

These are not supported by the plugin, as you can see here: https://streamlink.github.io/plugins.html#pluzz

Ok, I see. So Even if those websites are France TV related, and use the same player as france.tv, they won't be added, right ?

@bastimeyer
Copy link
Member Author

they won't be added, right

No, because there are no live streams and the plugin would require further modifications in order to support those sites.

@Facy5
Copy link

Facy5 commented May 31, 2023

Ok !

@bastimeyer bastimeyer mentioned this pull request Jul 5, 2023
4 tasks
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.pluzz: La 1ere subdomain from francetvinfo.fr is not supported
2 participants