- Install python3, download tools: ffmpeg and N_m3u8DL-RE
- Put kdl.py, ffmpeg and N_m3u8DL-RE into same folder
- Run
python kdl.py
it will ask you to inputkinescope embed link
(e.g. https://kinescope.io/embed/1234534) andreferrer link
(e.g. https://videos.mysite.org). kinescope forbids to access without a referrer. - Wait for a download copletion.
kdl.py can automatically select the best quality of a video or you can choose it in a menu provided by N_m3u8DL-RE.
ffmpeg receives parts of the selected video and an audio and muxes them into output mp4 file.
Use your Browser developer tools to find a request to https://kinescope.io/embed/ an use in the script.
Best option to make sure that you are providing right referrer and embedded link is:
- Open in chrome
- Press F12
- Open your webpage, what you want to download
- Press ctrl+ F, and type "u0026"
- You will find list of urls, which contains videos. In Header tab you can grab right referrer and embedded link.
- If
dash = re.findall(r'dash: {"src":"(.?)"', resp)[0].strip()
still fails, then switch to response tab and find link, which contains "u0026
" (what you found on step 4) , it wll loks like :https://kinescope.io/29402382-ec45-4ea0-b45f-be4fc4f34ff5/master.m3u8?expires=1731320757\u0026token=
, without "\u0026token=" it exactly string , what codedash = re.findall(r'{"src":"(.?)"', resp)[0].strip()
is trying to find, so just hardcode it
Thanks to @kunter
Unfortunately I stuck here.