I meant the token from the developer console when playing the videoCode:C:\Users\User\Desktop\Test>python DRMToday.py Enter pssh : AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQ7dCN8Y5SODG7GEnriX8g4BoIY2FzdGxhYnMiGDdkQ044WTVTT0RHN0dFbnJpWDhnNEE9PTIHZGVmYXVsdA== Enter Token: eyJ1c2VySWQiOiJhbm9ueW1vdXNocnQiLCJzZXNzaW9uSWQiOiJIeU94MVFnZmVPUzVnNVR4UW1yRUNXeHVQOEt5dGRwdXlUVUJCa04ydWdJOE5OWGJ5c1NvclZmWmR4eXQxZ0ROX0xLY25NWXlTcmRaT2htc25aSUFBZy4uIiwibWVyY2hhbnQiOiJhdmlpb24yIn0= Response: <Response [412]> Traceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\User\Desktop\Test\DRMToday.py", line 26, in <module> license_b64 = response.json()['license'] ^^^^^^^^^^^^^^^ File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[Attachment 74270 - Click to enlarge]
I don't know what to tell you, it works for me and ElCap.
Enable clipboard history (Windows key + V)
Run DRMToday.py
Copy the token to your clipboard
Copy the PSSH to your clipboard
Right click to paste the PSSH and press enter
Press Windows+V, select the token and press enter again
Your key should pop up.
Make sure to do this quickly! The token expires very fast.
sorry but doesnt appear the token, i cant see the token
+ Reply to Thread
Results 31 to 60 of 61
-
Enter pssh : AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQ7d CN8Y5SODG7GEnriX8g4BoIY2FzdGxhYnMiGDdkQ044WTVTT0RH N0dFbnJpWDhnNEE9PTIHZGVmYXVsdA==
Enter Token: eyJtYW51ZmFjdHVyZXIiOiJHb29nbGUiLCJtb2RlbCI6IkNocm 9tZUNETS1XaW4teDY0LTkiLCJkcm1WZXJzaW9uIjoiMjY4MzAi LCJzZWNMZXZlbCI6MywiaGRjcFN1cHBvcnQiOiJIRENQX05PTk UiLCJ2ckNvbnN0cmFpbnRTdXBwb3J0IjpmYWxzZSwidm1wU3Rh dHVzIjoiUExBVEZPUk1fU0VDVVJFX1NUT1JBR0VfU09GVFdBUk VfVkVSSUZJRUQifQ==
Traceback (most recent call last):
File "C:\Users\mario\AppData\Roaming\Python\Python311\s ite-packages\requests\models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\mario\Desktop\DRMToday\DRMToday.py", line 24, in <module>
license_b64 = response.json()['license']
^^^^^^^^^^^^^^^
File "C:\Users\mario\AppData\Roaming\Python\Python311\s ite-packages\requests\models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] <!doctype html><html lang="en"><head><title>HTTP Status 412 – Precondition Failed</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 412 – Precondition Failed</h1></body></html>: -
-
I think you have the wrong header in the script.
Show the code from drmtoday.py script.
The drmtoday.py from the zip file uses a different to hrti.
You need to change it to what petar20 had here https://forum.videohelp.com/threads/410632-need-help-to-get-the-drm-keys-from-a-vtm-pr...am#post2708481 -
import base64
import requests
import json
from pywidevine.cdm import cdm, deviceconfig
from base64 import b64encode
from pywidevine.decrypt.wvdecrypt import WvDecrypt
pssh = input('\nEnter pssh : ')
token = input("Enter Token: ")
wvdecrypt = WvDecrypt(pssh)
raw_challenge = wvdecrypt.get_challenge()
challenge_b64 = b64encode(raw_challenge).decode()
headers = {
'x-dt-auth-token': token,
}
data = raw_challenge
response = requests.post('https://lic.drmtoday.com/license-proxy-widevine/cenc/', headers=headers, data=data)
license_b64 = response.json()['license']
wvdecrypt.update_license(license_b64)
keys = wvdecrypt.start_process()
print('\n\nKeys:\n')
if keys:
for key in keys:
print(key)
i did download from there, promise -
Change the header from 'x-dt-auth-token' to 'dt-custom-data' in the py script.
-
Traceback (most recent call last):
File "C:\Users\mario\AppData\Roaming\Python\Python311\s ite-packages\requests\models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\mario\Desktop\DRMToday\DRMToday.py", line 24, in <module>
license_b64 = response.json()['license']
^^^^^^^^^^^^^^^
File "C:\Users\mario\AppData\Roaming\Python\Python311\s ite-packages\requests\models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] <!doctype html><html lang="en"><head><title>HTTP Status 412 – Precondition Failed</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 412 – Precondition Failed</h1></body></html>: 0
doesnt work -
aUUcxanU0WTNtdWQ5LWhNaE05dUE2djNidWh4azVueHhUMTVNU V95aWR1QS4uIiwibWVyY2hhbnQiOiJhdmlpb24yIn0=
Traceback (most recent call last):
File "C:\Users\mario\AppData\Roaming\Python\Python311\s ite-packages\requests\models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\mario\Desktop\DRMToday\DRMToday.py", line 24, in <module>
license_b64 = response.json()['license']
^^^^^^^^^^^^^^^
File "C:\Users\mario\AppData\Roaming\Python\Python311\s ite-packages\requests\models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] <!doctype html><html lang="en"><head><title>HTTP Status 403 – Forbidden</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 403 – Forbidden</h1></body></html>: 0 -
-
-
-
-
are you asking what a working response looks like?
if so, its the same format to what the browser gets in the response tab
example - hrt1 channel
Code:>python DRMToday.py Enter pssh : AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQ7dCN8Y5SODG7GEnriX8g4BoIY2FzdGxhYnMiGDdkQ044WTVTT0RHN0dFbnJpWDhnNEE9PTIHZGVmYXVsdA== Enter Token: eyJ1c2VySWQiOiI5ODk0MTgiLCJzZXNzaW9uSWQiOiJRYWh4ZkFodlFSYVpIVFl3dVUzS1B1T1JJVUNuWjdfNnFHQmg2S3pUYjdVLiIsIm1lcmNoYW50IjoiYXZpaW9uMiJ9 {"service_version_info":{"license_sdk_version":"18.0.1","license_service_version":"DRMtoday"},"supported_tracks":[{"type":"HD","key_id":"7dCN8Y5SODG7GEnriX8g4A=="}],"message_type":"LICENSE_REQUEST","status":"OK","license":"CAIS9wIKTgogQjFEOEZBOUNBNzJERUM4OTAxMDAwMDAwMDAwMDAwMDASJgoQOYeQVZjvTsGwN05NeV2Z5xABMhA6VmJ0Nfyg/h/6+aO8TxPwIAEoABIaCAEQARgAIAAoADgAQgBIAFAAWABgAXAAeAAaZhIQ8fE2E446dyQlCgC52isC2RpQf/2XON5o/5iK357Jfh0pBfK0j2C6MidrtiDsMSdOKYWJp3mQXzpZLYpYw8dgLAHgLqP2Ultt4th5N0hyJeWlDAv6+MvCQM3bn2vHGtwn9WsgARqYAQoQ7dCN8Y5SODG7GEnriX8g4BIQXWImoFHc8cTi7yBCW1A2+RogaeqJ2ZYL4uQL+HupZpR/ZrcQJ4S+vCw02cn4KQaLVEIgAigBMggIABAqGAAgADoICAAQKhgAIABCNAogzAbizaUDc7dDSbEpJSAv7SDPdSxIdUZPrqorwnQh5Z0SENmcMoxHGdyAcyyPNIvU1CBiAkhEIIOAkqkGOAAaIP9Pu0j+/wLuUfuhSUrdTdtJ7vwL+OFwen633mVgjjUgIoAC1f5DGBszY9/QkblZGKjRHrtM7Zh/w1U4t+dXKyvMIVu+MnyNqA5LqgPY8Uc/82+wKnAskNw1WT5lLzBoAfqvHbLhmZy640fVV3UI4gBKVNlswQo3l+sPmqahHepE4qDHuT/HnAPQxLXoEnNdmbuLyPUQfZqrDsl1TvXCLUgRDFQ4hzE40yD3Lsu6/SWIblPWiZDKQb2wfsn3I6Gp44wDTzxH0l8YAkMhDSyBrYnfxKIFlCO5HY3hce4nlsHrSTDoTT/weE3Bo3BHhcY2JxkGcQ8wzfCVC8eSG+fWMiHIXFxEOVYTlDPmNvieMRvHG8m1Xq+dZsLoR1+chwWicKHB+zoICgYxOC4wLjFAAVgA","platform":"android"} Keys: edd08df18e523831bb1849eb897f20e0:5d936f87fd0aab2aba6578d1342d5041
-
Last edited by marioeivissa; 9th Oct 2023 at 17:59.
-
-
Thanks for answers.
Yes, I was asking for working response, how it looks like.
You show it and I see it for the first time how it looks like.
I have never got such results, always error code 412 or 403.
Don't understand where can be problem.
Maybe something is wrong install with python or any module and that makes those errors. -
Last edited by marioeivissa; 9th Oct 2023 at 18:08.
-
-
412 error code is normally when the dt-custom-data header isnt in the request.
403 error code is normally when the dt-custom-data header is in the request but has expired (assuming its not a geo restriction error)
if you are still getting the 412 error code then it might be something simple like you are editing the script, but then running the old script.
Can you unzip the drmtoday.zip file to a new folder, then overwrite the drmtoday.py file with the code that Karoolus posted here https://forum.videohelp.com/threads/410632-need-help-to-get-the-drm-keys-from-a-vtm-pr...am#post2708493
then run it from the new folder. -
-
-
i got it!!!!!!!!!!!!thanks, i did again with a new and clean drmtoday
C:\Users\mario\Desktop\DRMToday>py DRMToday.py
Enter pssh : AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQxM q0wMCcPDGJN7hwHlQU5BoIY2FzdGxhYnMiGHhNcTB3TUNjUERH Sk43aHdIbFFVNUE9PTIHZGVmYXVsdA==
Enter Token: eyJ1c2VySWQiOiJhbm9ueW1vdXNocnQiLCJzZXNzaW9uSWQiOi J2UVhYM3pLdzhfZmhpbEhycUJTdEl4ck0zZkZuT0ZqZmcwV0dK cENwcDU0YXZHTlFRc0M5RFRWOGJYRGNraElmOE96MjZjOEd6Wk xJamg2VlNFUU4yQS4uIiwibWVyY2hhbnQiOiJhdmlpb24yIn0=
Keys:
c4cab4c0c09c3c318937b8701e5414e4:c8dea2b6a77123b51 9de306284d2314f -
one question drmtoday only works for rmptoday license links, anything funcional for others links? likehttps://wv-ottlic-f3.imagenio.telefonica or https://drm.gateway.indazn.com
Last edited by marioeivissa; 9th Oct 2023 at 18:46.
Similar Threads
-
help with getting drm keys
By bittersweet in forum Video Streaming DownloadingReplies: 19Last Post: 3rd May 2025, 16:12 -
circumventing DRM or hacking encryption keys
By sum_guy in forum FeedbackReplies: 10Last Post: 5th Aug 2024, 03:57 -
Need a few keys from VTM GO
By TomVDJ in forum Video Streaming DownloadingReplies: 16Last Post: 14th Jan 2024, 13:33 -
streamlink + DRM keys
By skipmack46 in forum Video Streaming DownloadingReplies: 6Last Post: 6th Aug 2023, 17:35 -
DRM keys
By David-XX in forum Video Streaming DownloadingReplies: 8Last Post: 14th Oct 2022, 16:27