How to download videos from Yuketang
November 13, 2020
I don’t like the Yuketang interface. There’s many advantages to watching lectures playback. I like to watch video on VLC, where I can take notes and index parts of it. I got interested in this. Here’s a quick and dirty way to download videos.
Video
- Inspect element (works best in chrome) first, go to
Network
, chooseMedia
and then click ‘直播回放‘/Playback。 - Get the m3u8 link and copy it.
- Get streamlink. In your favorite terminal, run
streamlink "m3u8 link" best -o output.mp4
You can chooseworst
in place ofbest
for a lower-quality download.
MP3 recording (similar)
- Inspect element (works best in chrome) first, go to
Network
, chooseMedia
and then click ‘直播回放‘/Playback。 My audio recording lectures are broken up into chunks, so I painstakingly retrieve all the links individually. You can also download the page source or .har file and grep out all the mp3 files. Let’s say I have linksA B C
- In your favorite terminal, run
wget --output-document=combined.mp3 A B C
Let me know if you have any problems or have a cleaner way to get it done.
More related topics I’d like to explore
- The general art of pulling videos off the internet
- Legal issues. youtube-dl is a popular tool also for this purpose recently served it’s death sentence for DMCA rights
- Should content providers be allowed to legislate this kind of protection against you storing their data?
- No matter what a company does, the video can always be saved - the worst case is someone films it.