i have the code:
def decrypt_keys():
wvdecrypt = WvDecrypt(pssh)
raw_challenge = wvdecrypt.get_challenge()
challenge_b64 = b64encode(raw_challenge).decode()
widevine_license = requests.post(
url=lic_url, data=raw_challenge, headers=headers, timeout=10)
license_b64 = b64encode(widevine_license.content)
wvdecrypt.update_license(license_b64)
keys = wvdecrypt.start_process()
if keys:
return keys
keys = decrypt_keys()
for key in keys:
print("\n[green]+ [INFO] KEY: --key [/green]" + key)
and the error when I get the keys is:
for key in keys:
TypeError: 'NoneType' object is not iterable
Can someone help me fix the above error? Thanks!
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 8 of 8
-
-
wvdecrypt returns a tuple containing an indicator of succes or otherwise and a list object containing keys.
You are saying your keys are equal to the tuple
Try this:
Code:def WV_Function(pssh, lic_url, cert_b64=None): wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic) widevine_license = requests.post(url=lic_url, data=wvdecrypt.get_challenge(), headers=None) license_b64 = b64encode(widevine_license.content) wvdecrypt.update_license(license_b64) Correct, keyswvdecrypt = wvdecrypt.start_process() # chain any multiple keys with --key at the start if Correct: mykeys = '' for key in keyswvdecrypt: mykeys += '--key' + key print(mykeys) return mykeys
-
-
Then you have error elsewhere but not code errors as such. Probably something wrong with headers, pssh or the license. Who knows? It you check the value in 'Content' if it doesn't say 'Success' the cdm failed to do its job for some reason. Intercepting the command window in httptoolkit may give you more help. Or try sprinkling print(variable-name) statements throughout your code to make sure you've got what you're expecting at various stages.
My code listed headers as none - you may need headers to your site so add this example header file
Code:headers = { 'Accept': '*/*', 'Accept-Language': 'en-GB,en;q=0.7', 'Connection': 'keep-alive', }
But you may need to edit my minimal headers to whatever your curl of the license gives. -
[QUOTE=A_n_g_e_l_a;2680881] Thank you! i tried again with wks-keys also failed to get the keys, which before wks-keys and that re-mod worked fine. i tried to get keys by getwvkeys got 4 keys but those keys are not viewable either. maybe that site has fixed the error already. (I don't speak English so I have to use google translate, hope you understand.)
-
- There is one more problem I hope you can help me with:
I got a link but it contains tokens and only lasts a few hours like this:
https://abc.xyz/MzIxNzg5MzR8azFzcG9ydDFmcGxfNzIwcC5zdHJc2MTc3MDIx/manifest.mpd
Does anyone know how the php code automatically gets the link like this:
http://mysite.xyz/manifest.mpd
Thanks! -
That doesn't make much sense as you originally said you could not see any keys
GetVWKeys returned keys but you cannot see them?? How do you know keys were returned
??? not very well.
Here is the bare minimum change to your original code
Code:def decrypt_keys(): wvdecrypt = WvDecrypt(pssh) raw_challenge = wvdecrypt.get_challenge() challenge_b64 = b64encode(raw_challenge).decode() widevine_license = requests.post( url=lic_url, data=raw_challenge, headers=headers, timeout=10) license_b64 = b64encode(widevine_license.content) wvdecrypt.update_license(license_b64) correct , keys = wvdecrypt.start_process() if correct: return keys keys = decrypt_keys() for key in keys:
Similar Threads
-
AES 128 Key, How do i decrypt or find the key?
By GirlsGill in forum Video Streaming DownloadingReplies: 12Last Post: 12th Feb 2024, 08:03 -
I don't get key with wks-key.
By Brift_Bv in forum Video Streaming DownloadingReplies: 34Last Post: 18th Nov 2023, 03:35 -
No downloader working without key. now getting base64 key string is tough.
By akshaysic in forum Video Streaming DownloadingReplies: 6Last Post: 14th Jan 2023, 10:33 -
WKS-KEYS Giving Wrong Decryption Key?
By dimiti in forum Video Streaming DownloadingReplies: 8Last Post: 23rd Nov 2022, 00:44 -
A Video Object Notation
By Cuddly Squid in forum EditingReplies: 1Last Post: 1st Sep 2022, 20:21