- install the required programs and add them to your
PATH
- rename your playready cdm to
device.prd
and place it in the same directory as beyondlive.py
- open edge, use F12 to open the dev tools, then click esc to open the console
- switch to the network request blocking tab and enable blocking
- add a new entry to block the following url:
blc.drmkeyserver.com/playready_license
- open the stream or reload the tab if already on the desired page
- in the dev tools, switch to the network tab and filter for
mpd
- right click the entry and select
copy -> copy url
- use the manifest url in the following command to get the pssh
((Invoke-WebRequest "<url>").Content | findstr mspr:pro | Select-Object -First 1) -replace '<[^>]*>', ''
- return to the dev tools and filter for
playready
- right click the entry and select
copy -> copy as cURL (bash)
- use curl converter to convert the
curl
command to python
- copy the
headers
portion of the curl converter output
- open
beyondlive.py
and insert your pssh and headers
- create and activate a python virtual environment in the same directory as
beyondlive.py
- install the required modules
pip install pyplayready requests
- run the script to retrieve the decryption key
python beyondlive.py
- use the manifest url and key in the following command to begin downloading
n-m3u8dl-re <url> --key <key> --auto-select -mt --decryption-engine shaka_packager \
--live-real-time-merge --live-pipe-mux --live-keep-segments false --write-meta-json false
- when the stream has finished, use ctrl+c to exit
n-m3u8dl-re