VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Page 2 of 3
FirstFirst 1 2 3 LastLast
Results 31 to 60 of 85
  1. Originally Posted by stabbedbybrick View Post
    Youtube isn't quite as simple as that. There's additional json data being sent with the license request, and a ton of various headers. A custom script is needed.

    These are the keys I got for the sample url:

    Code:
    f5fe916b23c458dc9583329308759f7a:bc38c9c391c28bb5eaa41811ddc3b350
    14f9069d5597595ab3ec940ffe785f7f:d6bd4b8033ff945e5adaa327e4eaba7b
    how to have found the right pssh ? eme found wrong and short pssh ...

    also you can put here ?
    Quote Quote  
  2. Originally Posted by whs912km View Post
    how to have found the right pssh ? eme found wrong and short pssh ...

    also you can put here ?
    Use https://greasyfork.org/en/scripts/373903-eme-logger and https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en to retrieve it.
    Quote Quote  
  3. yes, i know that
    but tampermonkey can't find real pssh. but only short and wrong pssh
    useless to get the key. need to be convert some value, but not idea wich one ...

    Image
    [Attachment 70301 - Click to enlarge]


    about your post#30 to find lic url simply search "lic"
    but need also pssh to get the key ...
    Quote Quote  
  4. Originally Posted by besweeet View Post
    Originally Posted by stabbedbybrick View Post
    Youtube isn't quite as simple as that. There's additional json data being sent with the license request, and a ton of various headers. A custom script is needed.

    These are the keys I got for the sample url:

    Code:
    f5fe916b23c458dc9583329308759f7a:bc38c9c391c28bb5eaa41811ddc3b350
    14f9069d5597595ab3ec940ffe785f7f:d6bd4b8033ff945e5adaa327e4eaba7b
    I think my issue is the license URL. I can DM you the one I'm using, but I think it's wrong and could be why it's providing five keys that don't work. At least two of the five KIDs it gave me match the two that you sent.

    I can confirm that the keys you provided decrypts the audio correctly (used mp4decrypt) but not the video (none of the variants: WEBM / VP9, MP4 / VP9, MP4 / AVC1, using Shaka Packager and mp4decrypt).
    The license url itself is pretty straightforward: https://www.youtube.com/youtubei/v1/player/get_drm_license?alt=json&key=KEY.

    The video key I sent you works for the SD version since that's the max quality I get for that particular movie. Other movies do give me 1080p, and yt-dlp does seem to be able to dig it up here, but max SD in browser for some reason. Kind of weird, but it's just youtube being youtube I guess.
    Quote Quote  
  5. https://www.youtube.com/watch?v=dSyicDf9UvI

    PSSH:

    AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVV RVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBgAAAvRwc3NoAAAA AJoE8HmYQEKGq5LmW+CIX5UAAALU1AIAAAEAAQDKAjwAVwBSAE 0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAA OgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZg B0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQ AGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAH IAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEA VABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQ BZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBM AEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+AD wALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4A bgBRAGIANQBGAEoAZABWAFcAbABtAHoANwBKAFEAUAAvAG4AaA BmAGYAdwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBV AE0APgArAEUAUgBJAHIAQQBtAGgARwBVADgAPQA8AC8AQwBIAE UAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAA cwA6AC8ALwB3AHcAdwAuAHkAbwB1AHQAdQBiAGUALgBjAG8AbQ AvAGEAcABpAC8AZAByAG0ALwBwAGwAYQB5AHIAZQBhAGQAeQA/AHMAbwB1AHIAYwBlAD0AWQBPAFUAVABVAEIARQAmAGEAbQBwAD sAdgBpAGQAZQBvAF8AaQBkAD0ANwA1ADIAYwBhADIANwAwADMA NwBmAGQANQAyAGYAMgA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARA BBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==
    Quote Quote  
  6. Originally Posted by whs912km View Post
    yes, i know that
    but tampermonkey can't find real pssh. but only short and wrong pssh
    useless to get the key. need to be convert some value, but not idea wich one ...

    Image
    [Attachment 70301 - Click to enlarge]


    about your post#30 to find lic url simply search "lic"
    but need also pssh to get the key ...
    I had to update my version of the script and console then displayed all available values.

    Originally Posted by stabbedbybrick View Post
    The license url itself is pretty straightforward: https://www.youtube.com/youtubei/v1/player/get_drm_license?alt=json&key=KEY.

    The video key I sent you works for the SD version since that's the max quality I get for that particular movie. Other movies do give me 1080p, and yt-dlp does seem to be able to dig it up here, but max SD in browser for some reason. Kind of weird, but it's just youtube being youtube I guess.
    That's the license URL I originally used but it doesn't seem to work with GetWVKeys (I passed all request headers and the full alt & key parameters but it gives error 400). I used a different license URL and none of the five key IDs and keys work like yours did. What are you using to retrieve the keys?

    Looks like 1080p works on Android but not Chrome on Windows. As you said, it's YouTube being YouTube.
    Last edited by besweeet; 10th Apr 2023 at 16:22.
    Quote Quote  
  7. Originally Posted by besweeet

    Originally Posted by stabbedbybrick View Post
    The license url itself is pretty straightforward: https://www.youtube.com/youtubei/v1/player/get_drm_license?alt=json&key=KEY.

    The video key I sent you works for the SD version since that's the max quality I get for that particular movie. Other movies do give me 1080p, and yt-dlp does seem to be able to dig it up here, but max SD in browser for some reason. Kind of weird, but it's just youtube being youtube I guess.
    That's the license URL I originally used but it doesn't seem to work with GetWVKeys (I passed all request headers and the full alt & key parameters but it gives error 400). I used a different license URL and none of the five key IDs and keys work like yours did. What are you using to retrieve the keys?

    Looks like 1080p works on Android but not Chrome on Windows. As you said, it's YouTube being YouTube.
    I don't think it's going to work with the Getwvkeys site as is. There's cookie data and encoded json requests that need to be passed, and you'll probably need a custom script for it. Have you checked their discord? I'm pretty sure there have been yt scripts in there that uses their API.

    1080p works great normally, even with L3. It's just this movie in particular that doesn't give me anything higher than SD in browser.
    Quote Quote  
  8. holy shit
    today after LZZA post (thanks LZZA for your post) eme can found the right pssh ... weird

    Image
    [Attachment 70307 - Click to enlarge]


    so, from this long pssh:
    Code:
    AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVVRVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBgAAAvRwc3NoAAAAAJoE8HmYQEKGq5LmW+CIX5UAAALU1AIAAAEAAQDKAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AbgBRAGIANQBGAEoAZABWAFcAbABtAHoANwBKAFEAUAAvAG4AaABmAGYAdwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgArAEUAUgBJAHIAQQBtAGgARwBVADgAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAcwA6AC8ALwB3AHcAdwAuAHkAbwB1AHQAdQBiAGUALgBjAG8AbQAvAGEAcABpAC8AZAByAG0ALwBwAGwAYQB5AHIAZQBhAGQAeQA/AHMAbwB1AHIAYwBlAD0AWQBPAFUAVABVAEIARQAmAGEAbQBwADsAdgBpAGQAZQBvAF8AaQBkAD0ANwA1ADIAYwBhADIANwAwADMANwBmAGQANQAyAGYAMgA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==
    decoded is that:
    Code:
    AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVVRVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBg==
    and me too i've found same keys to stabbedbybrick post
    Quote Quote  
  9. Member
    Join Date
    Nov 2022
    Location
    Europe
    Search PM
    Originally Posted by whs912km View Post
    holy shit
    today after LZZA post (thanks LZZA for your post) eme can found the right pssh ... weird

    so, from this long pssh:
    Code:
    AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVVRVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBgAAAvRwc3NoAAAAAJoE8HmYQEKGq5LmW+CIX5UAAALU1AIAAAEAAQDKAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AbgBRAGIANQBGAEoAZABWAFcAbABtAHoANwBKAFEAUAAvAG4AaABmAGYAdwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgArAEUAUgBJAHIAQQBtAGgARwBVADgAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAcwA6AC8ALwB3AHcAdwAuAHkAbwB1AHQAdQBiAGUALgBjAG8AbQAvAGEAcABpAC8AZAByAG0ALwBwAGwAYQB5AHIAZQBhAGQAeQA/AHMAbwB1AHIAYwBlAD0AWQBPAFUAVABVAEIARQAmAGEAbQBwADsAdgBpAGQAZQBvAF8AaQBkAD0ANwA1ADIAYwBhADIANwAwADMANwBmAGQANQAyAGYAMgA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==
    decoded is that:
    Code:
    AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVVRVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBg==
    and me too i've found same keys to stabbedbybrick post
    Can I ask what methods you're using to get keys? Is it Getwvkeys or a script of some kind? I can't seem to figure out what headers are needed.
    Quote Quote  
  10. i've get keys with edited script. python script. not trough getwvkeys

    and what headers ? no need headers
    Quote Quote  
  11. Originally Posted by stabbedbybrick View Post
    I don't think it's going to work with the Getwvkeys site as is. There's cookie data and encoded json requests that need to be passed, and you'll probably need a custom script for it. Have you checked their discord? I'm pretty sure there have been yt scripts in there that uses their API.

    1080p works great normally, even with L3. It's just this movie in particular that doesn't give me anything higher than SD in browser.
    Good idea to check for a script. Found one for YouTube which was able to properly retrieve keys once I provided the cookie header. Can only decrypt the 480p version which is unfortunate. To me, SD-only videos don't cut it in 2023.
    Quote Quote  
  12. Yeah, Youtube is being annoying and will only serve up 1080p on PC for seemingly random titles. Like https://www.youtube.com/watch?v=6lCCk6rgn84 for example, you should be able to get FHD with your script.
    Quote Quote  
  13. Originally Posted by stabbedbybrick View Post
    Yeah, Youtube is being annoying and will only serve up 1080p on PC for seemingly random titles. Like https://www.youtube.com/watch?v=6lCCk6rgn84 for example, you should be able to get FHD with your script.
    yt-dlp can download all resolutions but the keys and shaka-packager don't decrypt them. The GetWVKeys admins said it's because 1080p is L1 which cannot be [easily or publicly] decrypted.
    Quote Quote  
  14. Well, that's not true. L3 works perfectly fine:

    Code:
    General
    Complete name                            : /temp/Pumping.Iron.1977.1080p.WEB-DL.mp4
    Format                                   : dash
    Codec ID                                 : dash (iso6/mp41)
    File size                                : 3.49 GiB
    Duration                                 : 1 h 25 min
    Overall bit rate                         : 5 850 kb/s
    Encoded date                             : UTC 2021-12-27 13:07:51
    Tagged date                              : UTC 2021-12-27 13:07:51
    
    Video
    ID                                       : 1
    Format                                   : vp09
    Codec ID                                 : vp09
    Duration                                 : 1 h 25 min
    Bit rate                                 : 5 848 kb/s
    Width                                    : 1 480 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 1.370
    Frame rate mode                          : Constant
    Frame rate                               : 23.976 (24000/1001) FPS
    Color space                              : YUV
    Bits/(Pixel*Frame)                       : 0.153
    Stream size                              : 3.49 GiB (100%)
    Title                                    : ISO Media file produced by Google Inc.
    Encoded date                             : UTC 2021-12-27 13:07:51
    Tagged date                              : UTC 2021-12-27 13:07:51
    Color range                              : Limited
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    Quote Quote  
  15. Hmm... What could I be doing wrong? I take the same keys I use for the 480p WEBM DL (which works) but for the 1080p WEBM and it doesn't work. Are there different keys I need to retrieve?
    Quote Quote  
  16. Yes, they are different. Audio is the same, but they differ depending on SD or HD.

    480p:

    Code:
    --key c8a34895e6cf5f829d5fbfa8b17a4db5:1a7981d8ae45e549621e5f4da66de542
    1080p:

    Code:
    --key e5add253150450bda1f09f79959a32fd:0db74b99402408a3559d86ded402f0ce
    As far as L1 vs L3, it might be different for the paid movies. I haven't checked those. But for these "Free with ads", L3 is enough.
    Quote Quote  
  17. Then the mystery is how to obtain the 1080p keys as you have...
    Quote Quote  
  18. Banned
    Join Date
    Apr 2022
    Location
    Hong Kong
    Search Comp PM
    Guys,

    I saw this note when converting the cURL to Python on curlconverter.com
    Image
    [Attachment 70325 - Click to enlarge]


    So when it says json_data will not be serialized by requests exactly as it was in the original request, what should I do? (It is a bit different from those in normal situations)

    I used WKS-KEYS to get the content keys, and I modified the original one, uploaded it to GitHub for convenience.
    Would anyone have a look at my code, for when I ran the .py program, it said "you should generate a license first"...

    URL hidden by user
    I have pasted all the things includin' cookies, headers, params and json_data to the headers.py in the WKS-KEYS.
    Much appreciated.

    Should it be
    Code:
    response = requests.post(
        'https://www.youtube.com/youtubei/v1/player/get_drm_license',
        params=params,
        cookies=cookies,
        headers=headers,
        json=json_data,
    )
    Or should it be like this:
    Code:
    response = requests.post(
        'https://www.youtube.com/youtubei/v1/player/get_drm_license',
        params=params,
        cookies=cookies,
        headers=headers,
        data=data, 
    )
    Last edited by CrymanChen; 18th Apr 2023 at 20:08.
    Quote Quote  
  19. Originally Posted by besweeet View Post
    Then the mystery is how to obtain the 1080p keys as you have...
    If we parse the license request, we can see this:

    Code:
    {'trackType': 'DRM_TRACK_TYPE_HD', 'keyId': '5a3SUxUEUL2h8J95lZoy_Q=='}, 
    {'trackType': 'DRM_TRACK_TYPE_SD', 'keyId': 'yKNIlebPX4KdX7-osXpNtQ=='},
    {'trackType': 'DRM_TRACK_TYPE_AUDIO', 'keyId': '-QxhjmVLVyiyATweN8T-Uw=='}
    So there is no mystery. If the movie is offering HD, you should be able to get them same way as the others.

    @CrymanChen:

    You're missing the actual license request. If you look at your curled data, there's a 'licenseRequest' in the json.
    Quote Quote  
  20. Originally Posted by stabbedbybrick View Post
    If we parse the license request, we can see this:

    Code:
    {'trackType': 'DRM_TRACK_TYPE_HD', 'keyId': '5a3SUxUEUL2h8J95lZoy_Q=='}, 
    {'trackType': 'DRM_TRACK_TYPE_SD', 'keyId': 'yKNIlebPX4KdX7-osXpNtQ=='},
    {'trackType': 'DRM_TRACK_TYPE_AUDIO', 'keyId': '-QxhjmVLVyiyATweN8T-Uw=='}
    So there is no mystery. If the movie is offering HD, you should be able to get them same way as the others.
    I continue to hit a wall...

    If I curl the get_drm_license request from my Android phone, it returns all three track types (per your quote above). However, if I submit everything through the GetWVKeys script, it continues to only give me SD and audio.

    I looked through the script and found headers and context information. I swapped everything with headers and other data from my phone yet it still only returns SD and audio.

    I'm starting to think it's the GetWVKeys Python script I'm using. Maybe it's not passing everything that YouTube needs and it defaults to desktop.

    Are you using the YouTube link I sent or a different link? GetWVKeys said that some older HD uploads are L3 while newer ones are L1.

    I tried CrymanChen's script and get the same error. I've added full headers to headers.py and added an empty section for params and json_data. I've copied the curled json_data (starting with context all the way to drmVideoFeature (since that is last) but the same error comes through: "generate a license request first!" It's probably a formatting error but I've had over 100 unsuccessful tests today.
    Last edited by besweeet; 12th Apr 2023 at 17:20.
    Quote Quote  
  21. Yeah, I'm not really sure what's wrong. For these "Free with ads" movies, it's seemingly random what titles have HD on PC. The one you first linked (Super Size), is 480p max. The one I linked later (Pumping Iron), is 1080p. Every movie I try that offer HD can be decrypted with L3, so that does not seem like the limitation. Unless there's an unreal coincidence that I'm picking only titles that work, it's Youtube itself that's limiting what is available on PC. I'm sure it's possible to write a script that emulates an android device request in order to get all titles in HD, but these movies are so easily accessible elsewhere, I can't imagine someone has gone through the trouble of doing that.

    You can try this:

    1. Pick a movie that you know have 1080p in browser and actually select it in the player.
    2. Refresh the page, play movie, and then curl the license or export whatever data your scripts need.
    3. You should now theoretically get three sets of keys. One for HD, one for SD, and one for Audio.
    Quote Quote  
  22. Banned
    Join Date
    Apr 2022
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by stabbedbybrick View Post
    @CrymanChen:

    You're missing the actual license request. If you look at your curled data, there's a 'licenseRequest' in the json.
    So may I ask how to modify the script...
    Letting the script use the request in the json_data rather than generate a new one?
    Quote Quote  
  23. Originally Posted by stabbedbybrick View Post
    You can try this:

    1. Pick a movie that you know have 1080p in browser and actually select it in the player.
    2. Refresh the page, play movie, and then curl the license or export whatever data your scripts need.
    3. You should now theoretically get three sets of keys. One for HD, one for SD, and one for Audio.
    I tried exactly thar but with no luck. I can DM what I've tried if you're interested in investigating.
    Quote Quote  
  24. Originally Posted by CrymanChen View Post

    So may I ask how to modify the script...
    Letting the script use the request in the json_data rather than generate a new one?
    If you read through this great post by A_n_g_e_l_a, she talks about generating an extra challenge. That's what you got to do for 'licenseRequest'. And it looks like she's using WKS, just like you, so you might be able to adapt it to youtube with the help of her examples.

    Originally Posted by besweeet
    I tried exactly thar but with no luck. I can DM what I've tried if you're interested in investigating.
    I don't think there's much I can do, unfortunately. You'll have much better luck by asking in their discord.
    Quote Quote  
  25. Originally Posted by LZAA View Post
    https://www.youtube.com/watch?v=dSyicDf9UvI

    PSSH:

    AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVV RVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBgAAAvRwc3NoAAAA AJoE8HmYQEKGq5LmW+CIX5UAAALU1AIAAAEAAQDKAjwAVwBSAE 0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAA OgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZg B0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQ AGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAH IAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEA VABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQ BZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBM AEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+AD wALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4A bgBRAGIANQBGAEoAZABWAFcAbABtAHoANwBKAFEAUAAvAG4AaA BmAGYAdwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBV AE0APgArAEUAUgBJAHIAQQBtAGgARwBVADgAPQA8AC8AQwBIAE UAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAA cwA6AC8ALwB3AHcAdwAuAHkAbwB1AHQAdQBiAGUALgBjAG8AbQ AvAGEAcABpAC8AZAByAG0ALwBwAGwAYQB5AHIAZQBhAGQAeQA/AHMAbwB1AHIAYwBlAD0AWQBPAFUAVABVAEIARQAmAGEAbQBwAD sAdgBpAGQAZQBvAF8AaQBkAD0ANwA1ADIAYwBhADIANwAwADMA NwBmAGQANQAyAGYAMgA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARA BBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==
    I know this is a weird question ,but do you think youtube cares about the pssh ?

    The following was tested using a pssh and i made a small change in the pssh and requested again :
    Image
    [Attachment 70424 - Click to enlarge]


    weird right ? different pssh and still the same keys , do you think youtube only cares about "videoId" ?

    Regards
    Quote Quote  
  26. Originally Posted by stabbedbybrick View Post

    If you read through this great post by A_n_g_e_l_a, she talks about generating an extra challenge. That's what you got to do for 'licenseRequest'. And it looks like she's using WKS, just like you, so you might be able to adapt it to youtube with the help of her examples.
    This is a great path to follow, but youtube is a special case where you need to make a small change because license in base64 can have unwanted characters .

    here is a small hint to fix the problem (thanks to ElCap):
    Code:
    licence.json()["license"].replace("-", "+").replace("_", "/")
    or you can simply use a script called "TPD-Keys" and you will have your keys , additionally some downloader applications may get the keys for you (don't know if they would provide keys for HD )

    Regards
    Quote Quote  
  27. Originally Posted by thej911 View Post
    or you can simply use a script called "TPD-Keys" and you will have your keys , additionally some downloader applications may get the keys for you (don't know if they would provide keys for HD )

    Regards
    Looks like TPD-Keys requires device_private_key and device_client_id_blob which require root to obtain. I'm out of luck.
    Quote Quote  
  28. Originally Posted by besweeet View Post
    Originally Posted by thej911 View Post
    or you can simply use a script called "TPD-Keys" and you will have your keys , additionally some downloader applications may get the keys for you (don't know if they would provide keys for HD )

    Regards
    Looks like TPD-Keys requires device_private_key and device_client_id_blob which require root to obtain. I'm out of luck.
    No you are not out of luck yet , please take a look at this thread to get your L3 CDM:
    https://forum.videohelp.com/threads/408031-Dumping-Your-own-L3-CDM-with-Android-Studio

    TPD-Keys requires Widevine RSA key pair file , you can get that from the cdm using the method in this post:
    https://forum.videohelp.com/threads/407144-Help-with-Channel-4-Key-to-this-programme-a...se#post2668861

    Good Luck
    Quote Quote  
  29. Originally Posted by thej911 View Post
    This is a great path to follow, but youtube is a special case where you need to make a small change because license in base64 can have unwanted characters .

    here is a small hint to fix the problem (thanks to ElCap):
    Code:
    licence.json()["license"].replace("-", "+").replace("_", "/")
    That's a good point. And it would seem that PSSH is irrelevant and the license stays the same for everyone.

    Since this forum tend to favor WKS-KEYS, I cobbled together a youtube script for it. I'm more of a "tinkerer" than a programmer, but it seems to work all right. Just drop it in the wks-keys folder, put the curled license data in headers.py and run it.

    Code:
    import requests
    import json
    from pywidevine.L3.cdm import deviceconfig
    from base64 import b64encode
    from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt
    import headers
    
    pssh = "AAAAQXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACEiGVlUX01FRElBOjZlMzI4ZWQxYjQ5YmYyMWZI49yVmwY="
    lic_url = "https://www.youtube.com/youtubei/v1/player/get_drm_license?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
    
    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)                   
    	raw_request = wvdecrypt.get_challenge()
    	json_data=headers.json_data
    	json_data["licenseRequest"] = b64encode(raw_request).decode("utf-8")
    	widevine_license = requests.post(lic_url, cookies=headers.cookies, headers=headers.headers, json=json_data)
    	license_b64 = widevine_license.json()["license"].replace("-", "+").replace("_", "/")
    	wvdecrypt.update_license(license_b64)			
    	Correct, keyswvdecrypt = wvdecrypt.start_process()
    	if Correct:
                return Correct, keyswvdecrypt   
    correct, keys = WV_Function(pssh, lic_url)
    
    print()
    for key in keys:
        print('--key ' + key)
    Quote Quote  
  30. Banned
    Join Date
    Apr 2022
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by stabbedbybrick View Post

    That's a good point. And it would seem that PSSH is irrelevant and the license stays the same for everyone.

    Since this forum tend to favor WKS-KEYS, I cobbled together a youtube script for it. I'm more of a "tinkerer" than a programmer, but it seems to work all right. Just drop it in the wks-keys folder, put the curled license data in headers.py and run it.

    Code:
    import requests
    import json
    from pywidevine.L3.cdm import deviceconfig
    from base64 import b64encode
    from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt
    import headers
    
    pssh = "AAAAQXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACEiGVlUX01FRElBOjZlMzI4ZWQxYjQ5YmYyMWZI49yVmwY="
    lic_url = "https://www.youtube.com/youtubei/v1/player/get_drm_license?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
    
    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)                   
    	raw_request = wvdecrypt.get_challenge()
    	json_data=headers.json_data
    	json_data["licenseRequest"] = b64encode(raw_request).decode("utf-8")
    	widevine_license = requests.post(lic_url, cookies=headers.cookies, headers=headers.headers, json=json_data)
    	license_b64 = widevine_license.json()["license"].replace("-", "+").replace("_", "/")
    	wvdecrypt.update_license(license_b64)			
    	Correct, keyswvdecrypt = wvdecrypt.start_process()
    	if Correct:
                return Correct, keyswvdecrypt   
    correct, keys = WV_Function(pssh, lic_url)
    
    print()
    for key in keys:
        print('--key ' + key)
    Really appreciate it. Finally made it by trying on my own.
    Image
    [Attachment 70425 - Click to enlarge]

    However, may I ask which is the manifest...
    Image
    [Attachment 70426 - Click to enlarge]
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!