CrymanChen / WKS-KEYS

A repo modified for bypassing Widevine L3 DRM and obtaining keys.
GNU General Public License v3.0
139 stars 27 forks source link

[Pinned] Cannot find "pywidevine.L3" module due to pywidevine installed #10

Open CrymanChen opened 8 months ago

CrymanChen commented 8 months ago

Hey guys, recently some friends just texted me that they encountered such a problem:

    from pywidevine.L3.cdm import cdm, deviceconfig
ModuleNotFoundError: No module named 'pywidevine.L3'

And it seems that they cannot understand what I mean even if I've told them how to do. So I decided to open an issue on my repository and then share the solution with y'all.
Actually it's been discussed in my experience last July: I wrote an article named NowTV DRM Key Solution: A GitHub repository based on Python, and I explained the reason as well as the solution to this problem.
Reason:
This WKS-KEYS repo needs a local pywidevine module, which as you can see, is a folder named "pywidevine". However, you may face this error when you have installed the pywidevine module via this command: pip install pywidevine. Then the descriptor will get confused, then return this ModuleNotFound error.
Solution:

  1. Make sure you have the script file (e.g. l3.py, or l3mubi.py.) and the unfolded WKS-KEYS.zip under the same folder.
  2. Uninstall your pip-installed pywidevine module using this command: pip uninstall pywidevine
  3. Run the script file again, then this error would disappear.

I hope that this would help you.