* fixed cookies for chromium browsers by switching to rookie * fixed productId which moved around since I coded this script up * added support for movie-type content e.g. documentaries, which dont have seasons or episodes and are just a single video * general code cleanup and probably some minor other things
Disclaimer
Credits go to SASUKE-DUCK and their repo PyWKS. This script uses their wks.py
file to extract keys.
I only wrote this npo-specific wrapper script.
This repository and its contents are published for educational purposes only.
Usage warning
The python package browser_cookie3
doesn't seem to be functional out of the box on Chrome versions >= 104.0.5112.102
, and I haven't been able to find an alternative. For now, if you use any chromium-based browser and get an error like PermissionError: [Errno 13] Permission Denied <cookiepath>
, follow the workaround here.
Setup
git clone https://gitea.quinten0508.com/quinten/npo
cd npo
- Download N_m3u8DL-RE and mp4decrypt and put
N_m3u8DL-RE.exe
andmp4decrypt.exe
in the root project folder - Download
/cdm/wks.py
and put it in an empty/cdm
folder within thenpo
folder - Add your own extracted android keys in
cdm/devices/android_generic/
(you can use KeyDive or possibly this guide to extract them):device_client_id_blob
device_private_key
pip install -r requirements.txt
Final folder structure should look like:
npo
│ npo all-in-one.py
│ mp4decrypt.exe
│ N_m3u8DL-RE.exe
│ requirements.txt
│ README.md
└───cdm
│ wks.py
└───devices
└───android_generic
device_client_id_blob
device_private_key
Usage
- Download single URL:
python 'npo all-in-one.py' -url <url>
- Download batch URLs:
python 'npo all-in-one.py' -file <file>
Description
Languages
Python
100%