Micron Document
downloading chinese movies/series for study

tl;dr: I made a couple scripts for fetching video from a specific online site, one scripts fetches a single target video and the other fetches an entire series.

background

There's a website I use for finding natively-produced mandarin language movies. It also carries a lot of bootleg materials. I forget if the country I'm in makes it illegal to unknowingly link to infringing materials or to link to a site that contains infringing materials, but I'm pretty sure I'm not breaking any laws here. The onus of licensing when watching shows online generally falls on the server providing the material. I don't know how far fair-use goes with downloading, but there must be some wiggle room here because of the site load balancing. The site has material going back a few years. Older material appears to be served up at a lower bandwidth priority than newer material. I have found that I simply cannot watch some material through a web browser because the priority is so low and the depth of caching is too low that it spends more time buffering than playing. Another down-side to the site is that it doesn't allow variable speed increase, you can do 1x, 2x, 4x, which completely misses my sweet spot of 3x for listening, so if I download stuff, I can play it back at any speed. I can screenshot and OCR subs (they tend to use hard subs) with decent quality instead of screenshotting a render in a browser window. It's just more convenient overall.

Anyway, the site in question is T383838olevod.com. The site is in Chinese, but it features a lot of images and one can stumble through it blindly and still figure out how to watch a movie or a series. I wrote two scripts to deal with the site, one that will download any given single title or episode when provided a link to the page serving up that video, and another that will try to download the entire series associated with that single title or episode. These scripts are very rough, the error handling is terrible, but they (seem to) work. They should be considered extremely fragile and prone to breaking at any time because the site does weird things that the scripts target instead of using a generic approach.

one-shot script for a video

I named this T383838steps.sh because I was debugging the process in steps.

It does the following:

• takes an argument that is a link to the show to fetch.
• fetches the m3u file for the episode or movie at that link.
• fetches the m3u file linked by the previous one that contains the playlist of all the segments that make up that movie.
• constructs links to all of the relative names used in that playlist and saves the resulting segments.
• uses ffmpeg to concatenate all of the segments into an output ts file
• uses ffmpeg to convert that concatenated file into a new output.mp4 file. I'm not certain that this step is necessary, but it doesn't hurt.
• removes the intermediate T383838output.ts file

It does NOT:

• delete the intermediate ts files
• make use of the title in creating a file name

Final output is a slew of intermediate files, an inputs file, and an T383838output.mp4.

Link to the script: steps.sh

iterative script for a series

I named this T383838series.sh and it contains duplicate logic from T383838steps.sh to do the bulk of the work, but is self-contained.

It does the following:

• takes an argument that is a link to a single episode in a series
• takes an argument to prefix shows or titles
• optionally takes an episode number to end with
• uses the input link as the starting episode number
• fetches the episodes using the same approach as T383838steps.sh
• renames the fetched content based on the passed in prefix and the number

It does not:

• take any steps to avoid a naming problem
• take any steps to discern the difference between an error in fetching vs exceeding the last episode

Basically it fetches the episode it's pointed at, names the output based on the specified prefix with the number from the link as the suffix, and if it encounters an error in fetching it assumes it finished fetching the series.

Link to the scripts: series.sh

Example use

Fetch a single episode:

T282828
bash steps.sh http://olevod.com/index.php/vod/play/id/78623/sid/1/nid/1.html

This grabs just episode one of 骄阳似我 and muddies the current directory with a lot of noise and intermediate files. I don't do cleanup on these because I haven't used the script enough to trust it's fully working, generally after running you'd want to:

T282828
rm *.ts

Plus I frequently forget to put ffmpeg in the current shell and end up having to re-run the last two instructions.

Fetch an entire series:

T282828
bash series.sh http://olevod.com/index.php/vod/play/id/78623/sid/1/nid/1.html 骄阳似我S01E

This creates a sub directory T38383801 that it muddies with all the intermediate files, and then one it finishes it leaves T383838骄阳似我S01E01.mp4 in the current directory. Again, I assume nothing works and like to be able to check the intermediate files.

If the script is called again for the same material, it will create a bunch of T383838.1 extension files for any duplicates it pulls down. It's not terribly useful, but I can compare file sizes to see what one failed to download, then clobber the broken one with a good one. I might make the script do it, but generally I just remove the last file and run it again.

More about my use

I have a Jellyfin server on my network using a raspberry pi 4. Jelly likes weird naming conventions for series:

• tv series name
• Season 01
• tv series name S01E01
• tv series name S01E02
• Season 02
• tv series name S02E01
• tv series name S02E02

There might be other formats that it likes but this is the one I generally target.

So if I were pulling down the one from the example above, I'd do this:

mkdir -p 骄阳似我/Season 01
cd 骄阳似我/Season 01
bash series.sh http://olevod.com/index.php/vod/play/id/78623/sid/1/nid/1.html 骄阳似我S01E

And that would produce:

• 骄阳似我
• Season 01
• 骄阳似我 S01E01.mp4
• 骄阳似我 S01E02.mp4
• 骄阳似我 S01E03.mp4

And then the metadata lookup for Jellyfin does a decent job of finding the show description and other information. Though I haven't tried it for the one in the example.

That being said, I adhere to this with Chinese shows despite never having encountered one that has more than a single season. :shrug:

Tags: study, cli

Tags
Navigation



created: 2026-01-04

(re)generated: 2026-07-17