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.
Solution: replacing Chromiuim's default libwidevine binary with one extracted from ChromeOS.
Download the latest ChromeOS libwidevine binary and extract it.
Copy the extracted libwidevinecdm.so to /usr/lib/chromium-browser.
Change the access permissions to 755 (chmod 755 libwidevinecdm.so
)
Credits to vpetkovs's blog post for finding this bright solution.