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
Results 1 to 12 of 12
  1. I have a script to rip Kanopy content if you want to use it, it can be found on http://github.com/larsenv/Kanopy-Downloader/
    Quote Quote  
  2. Originally Posted by Larsenv View Post
    I have a script to rip Kanopy content if you want to use it, it can be found on http://github.com/larsenv/Kanopy-Downloader/
    Thank you!
    Last edited by xcxc; 7th Sep 2024 at 17:00.
    Quote Quote  
  3. I, like I am sure many are not familiar with playing with github scripts.....this looks like something you have to load in python or something like that.
    Quote Quote  
  4. yea, it's python script

    follow this forum, and maybe you'll learn how to use Python scripts. this whole forum is based on these scripts
    Quote Quote  
  5. Member
    Join Date
    Jan 2025
    Location
    Seattle
    Search Comp PM
    Hello, I'm trying to run the Kanopy.py script and am getting the following output/error. Does anyone have any idea what the issue might be?
    I've included the content of my Header.py file below as well.
    Thanks for any info! Sqwuade

    PS D:\Kanopy-Downloader-main> python Kanopy.py https://www.kanopy.com/en/snoisle/watch/video/113543
    Traceback (most recent call last):
    File "D:\Kanopy-Downloader-main\Kanopy.py", line 26, in <module>
    lists = response.json()["list"]
    ~~~~~~~~~~~~~~~^^^^^^^^
    KeyError: 'list'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "D:\Kanopy-Downloader-main\Kanopy.py", line 37, in <module>
    lists["list"][0]["video"] = response.json()["video"]
    ~~~~~~~~~~~~~~~^^^^^^^^^
    KeyError: 'video'
    PS D:\Kanopy-Downloader-main>

    ####### Header.py code ########

    cookies = {
    '__cfruid': '68757aaf8113dad52e16269c46a36b3edc555961-1737372044',
    'cf_clearance': 'QyqaRW9dtYj2YYzrnnYtYYZto4WO3A5U8JG7.zVXZ_Y-1737375155-1.2.1.1-DADxRfPHnRUwnbs7SUs.ywRo6Rx9Mk0NR3cH9b_MCPEuH3shRK yDS5kZ86zjF_7VCDBVQBfk60L6zeYRwUxSXVsrHUzAuPqvIKrz vbQ36zSdeTvOkug5rTHSC16uQv6byVQD_ptY3UNGGstE6HoEDh H1E7jTA9OSSkJpn.LKzrrTuaIOQg1pPmbfUu7vPQ7Ut7l_qHI9 aAdrYs1HITDwMvZwF9SKHNoUJW698FBip12gg3FR2Vx9sMnu8T JaNKud2SbU0Bpq7HpvNTPLVAhbZXydHGzSLSqsYAz_CXWncQs' ,
    'kapi_token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7 InVpZCI6Ijg4MzMxMzUiLCJpZGVudGl0eV9pZCI6IjQ1MDU4Nz gzNCIsInZpc2l0b3JfaWQiOiIxNzM3MzcyMDQ0ODg4MDgwODIz Iiwic2Vzc2lvbl9pZCI6IjE3MzczNzIxMDQ4NjIwMDUzNDkiLC Jjb25uZWN0aW9uX2lkIjoiMTczNzM3MjEwNDg2MjAwNTM0OSIs Imt1aV91c2VyIjoxLCJyb2xlcyI6WyJjb21Vc2VyIl19LCJpYX QiOjE3MzczNzIxMDQsImV4cCI6MjA1MjczMjEwNCwiaXNzIjoi a2FwaSJ9.YuVzVlW1W0C1UZN57YUyxidcRMzAK0GEuUjlr3AWa _8',
    'token_set': '%222025-01-20T11%3A21%3A45.267Z%22',
    'visitor_id': '1737372044888080823',
    'webshop': '%7B%22id%22%3A2%2C%22code%22%3A%22US%22%2C%22name %22%3A%22United%20States%22%7D',
    '_ga_GGQJZHYDLG': 'GS1.1.1737375154.2.1.1737375155.59.0.0',
    '_ga': 'GA1.1.1158665099.1737372046',
    'uid': '8833135',
    'muxData': '=undefined&mux_viewer_id=5513369f-31ae-4d9b-a327-6a46177a92dc&msn=0.7112613705044318&sid=d9d531f2-0b88-4b17-9fdf-91f3c3f09b38&sst=1737375154322&sex=1737376654322',
    }

    headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0',
    'Accept': 'application/json, text/plain, */*',
    'Accept-Language': 'en-US,en;q=0.5',
    # 'Accept-Encoding': 'gzip, deflate, br, zstd',
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7I nVpZCI6Ijg4MzMxMzUiLCJpZGVudGl0eV9pZCI6IjQ1MDU4Nzg zNCIsInZpc2l0b3JfaWQiOiIxNzM3MzcyMDQ0ODg4MDgwODIzI iwic2Vzc2lvbl9pZCI6IjE3MzczNzIxMDQ4NjIwMDUzNDkiLCJ jb25uZWN0aW9uX2lkIjoiMTczNzM3MjEwNDg2MjAwNTM0OSIsI mt1aV91c2VyIjoxLCJyb2xlcyI6WyJjb21Vc2VyIl19LCJpYXQ iOjE3MzczNzIxMDQsImV4cCI6MjA1MjczMjEwNCwiaXNzIjoia 2FwaSJ9.YuVzVlW1W0C1UZN57YUyxidcRMzAK0GEuUjlr3AWa_ 8',
    'X-Version': 'web/prod/4.16.1/2024-12-16-15-01-06',
    'Origin': 'https://www.kanopy.com',
    'Connection': 'keep-alive',
    'Referer': 'https://www.kanopy.com/en/snoisle/watch/video/113543',
    # 'Cookie': '__cfruid=68757aaf8113dad52e16269c46a36b3edc555961-1737372044; cf_clearance=QyqaRW9dtYj2YYzrnnYtYYZto4WO3A5U8JG7. zVXZ_Y-1737375155-1.2.1.1-DADxRfPHnRUwnbs7SUs.ywRo6Rx9Mk0NR3cH9b_MCPEuH3shRK yDS5kZ86zjF_7VCDBVQBfk60L6zeYRwUxSXVsrHUzAuPqvIKrz vbQ36zSdeTvOkug5rTHSC16uQv6byVQD_ptY3UNGGstE6HoEDh H1E7jTA9OSSkJpn.LKzrrTuaIOQg1pPmbfUu7vPQ7Ut7l_qHI9 aAdrYs1HITDwMvZwF9SKHNoUJW698FBip12gg3FR2Vx9sMnu8T JaNKud2SbU0Bpq7HpvNTPLVAhbZXydHGzSLSqsYAz_CXWncQs; kapi_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey JkYXRhIjp7InVpZCI6Ijg4MzMxMzUiLCJpZGVudGl0eV9pZCI6 IjQ1MDU4NzgzNCIsInZpc2l0b3JfaWQiOiIxNzM3MzcyMDQ0OD g4MDgwODIzIiwic2Vzc2lvbl9pZCI6IjE3MzczNzIxMDQ4NjIw MDUzNDkiLCJjb25uZWN0aW9uX2lkIjoiMTczNzM3MjEwNDg2Mj AwNTM0OSIsImt1aV91c2VyIjoxLCJyb2xlcyI6WyJjb21Vc2Vy Il19LCJpYXQiOjE3MzczNzIxMDQsImV4cCI6MjA1MjczMjEwNC wiaXNzIjoia2FwaSJ9.YuVzVlW1W0C1UZN57YUyxidcRMzAK0G EuUjlr3AWa_8; token_set=%222025-01-20T11%3A21%3A45.267Z%22; visitor_id=1737372044888080823; webshop=%7B%22id%22%3A2%2C%22code%22%3A%22US%22%2C %22name%22%3A%22United%20States%22%7D; _ga_GGQJZHYDLG=GS1.1.1737375154.2.1.1737375155.59. 0.0; _ga=GA1.1.1158665099.1737372046; uid=8833135; muxData==undefined&mux_viewer_id=5513369f-31ae-4d9b-a327-6a46177a92dc&msn=0.7112613705044318&sid=d9d531f2-0b88-4b17-9fdf-91f3c3f09b38&sst=1737375154322&sex=1737376654322',
    'Sec-Fetch-Dest': 'empty',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Site': 'same-origin',
    # Requests doesn't support trailers
    # 'TE': 'trailers',
    }

    json_data = {
    'videoId': 113543,
    'userId': 8833135,
    'domainId': 3633,
    }
    Quote Quote  
  6. kanopy change nothing half a year, and you copy paste cookie&headers should correct, so the script has some bug. this script not use a local CDM, it use cdrm sites api, that maybe has some changes. and the videoid, it's really int format not string? give widevine proxy2 which in sticky thread a try is a better choice.
    Quote Quote  
  7. Originally Posted by shellcmd View Post
    kanopy change nothing half a year, and you copy paste cookie&headers should correct, so the script has some bug. this script not use a local CDM, it use cdrm sites api, that maybe has some changes. and the videoid, it's really int format not string? give widevine proxy2 which in sticky thread a try is a better choice.
    glad I didn't waste my time learning this then.
    Quote Quote  
  8. Originally Posted by rodling View Post
    Originally Posted by shellcmd View Post
    kanopy change nothing half a year, and you copy paste cookie&headers should correct, so the script has some bug. this script not use a local CDM, it use cdrm sites api, that maybe has some changes. and the videoid, it's really int format not string? give widevine proxy2 which in sticky thread a try is a better choice.
    glad I didn't waste my time learning this then.
    the script has already been updated to use the latest version of the cdrm service and I have fixed what I believe is the problem with the video id
    Quote Quote  
  9. Originally Posted by Larsenv View Post
    Originally Posted by rodling View Post
    Originally Posted by shellcmd View Post
    kanopy change nothing half a year, and you copy paste cookie&headers should correct, so the script has some bug. this script not use a local CDM, it use cdrm sites api, that maybe has some changes. and the videoid, it's really int format not string? give widevine proxy2 which in sticky thread a try is a better choice.
    glad I didn't waste my time learning this then.
    the script has already been updated to use the latest version of the cdrm service and I have fixed what I believe is the problem with the video id
    that's great, I am still not experienced enough in python to just install and use scripts without at least some kind of guide. I am learning but not
    there yet, so I can't really give much feedback.

    except to ask if it's true you're using server-side features that could be done locally.
    Quote Quote  
  10. Originally Posted by rodling View Post
    Originally Posted by Larsenv View Post
    Originally Posted by rodling View Post
    Originally Posted by shellcmd View Post
    kanopy change nothing half a year, and you copy paste cookie&headers should correct, so the script has some bug. this script not use a local CDM, it use cdrm sites api, that maybe has some changes. and the videoid, it's really int format not string? give widevine proxy2 which in sticky thread a try is a better choice.
    glad I didn't waste my time learning this then.
    the script has already been updated to use the latest version of the cdrm service and I have fixed what I believe is the problem with the video id
    that's great, I am still not experienced enough in python to just install and use scripts without at least some kind of guide. I am learning but not
    there yet, so I can't really give much feedback.

    except to ask if it's true you're using server-side features that could be done locally.
    yes Im using server side stuff which broke a couple times and its to save the hassle of getting a cdm
    Quote Quote  
  11. Hi, I'm not sure what I'm doing wrong. I get following error all the time:
    Code:
    name 'video_url' is not defined
    .

    Code:
    python Kanopy.py https://www.kanopy.com/en/detroitpubliclibrary/watch/video/15215748
    Traceback (most recent call last):
      File "/Users/hdblljh/Kanopy-Downloader/Kanopy.py", line 16, in <module>
        Kanopy_ID = video_url.split("/")[6]
                    ^^^^^^^^^
    NameError: name 'video_url' is not defined
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Users/hdblljh/Kanopy-Downloader/Kanopy.py", line 21, in <module>
        Kanopy_ID = video_url
                    ^^^^^^^^^
    NameError: name 'video_url' is not defined
    Quote Quote  
  12. Originally Posted by hdblljh View Post
    Hi, I'm not sure what I'm doing wrong. I get following error all the time:
    Code:
    name 'video_url' is not defined
    .

    Code:
    python Kanopy.py https://www.kanopy.com/en/detroitpubliclibrary/watch/video/15215748
    Traceback (most recent call last):
      File "/Users/hdblljh/Kanopy-Downloader/Kanopy.py", line 16, in <module>
        Kanopy_ID = video_url.split("/")[6]
                    ^^^^^^^^^
    NameError: name 'video_url' is not defined
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Users/hdblljh/Kanopy-Downloader/Kanopy.py", line 21, in <module>
        Kanopy_ID = video_url
                    ^^^^^^^^^
    NameError: name 'video_url' is not defined
    Exact same error and output here, unfortunately. Since you're getting it too, it makes me think something may have changed on Kanopy's side that the script needs updated for?

    Just to mention my Header.py is laid out exactly like rodling's except mine lacks these two likely irrelevant commented lines:
    Code:
    # Requests doesn't support trailers
    # 'TE': 'trailers',
    Larsenv: Thank you for developing this. If we are making a usage error, I'd appreciate if you could point it out. Cheers.
    Quote Quote  



Similar Threads

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