How to enable DRM in chromedriver headless mode

爱⌒轻易说出口 提交于 2020-12-12 11:04:18

问题


I am aware that there is no official support for DRM-protected content (e.g. Spotify webplayer, netflix, etc.) when using headless chromedriver.

Has anyone here gotten it to work despite the aforementioned limitation?

I went as far as using a custom profile in headless chromedriver (one that should include WidevineCdm), but so far no luck.


回答1:


Solution: replacing Chromiuim's default libwidevine binary with one extracted from ChromeOS.

  1. Download the latest ChromeOS libwidevine binary and extract it.

  2. Copy the extracted libwidevinecdm.so to /usr/lib/chromium-browser.

  3. Change the access permissions to 755 (chmod 755 libwidevinecdm.so)

Credits to vpetkovs's blog post for finding this bright solution.



来源:https://stackoverflow.com/questions/58477667/how-to-enable-drm-in-chromedriver-headless-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!