Skip to content

josephsamela/l1t-protips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

l1t-protips

Happy Devember 2020!

Everyone loves the L1T news! Those rascals have a running joke giving "protips" for people unfortunate enough to make the weekly news. It would be fun to see a supercut of all protips from the history of the show...but finding them all?

That's what these scripts do! They use the Youtube auto-generated subtitles to locate the timestamp(s) of the phrase "protip" inside every video and download the clip!

<iframe style="position:relative;top:0;left:0;width:100%;height:calc(90vw/1.777778);max-height: 395px;min-height: 255px;" src="https://www.youtube.com/embed/_K_5wVtvGqA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Setup

Ok, to get this done you'll need a bash shell with the following tools.

  • youtube-dl
  • ffmpeg
  • jq
  • python3.6+

For youtube-dl and ffmpeg whatever version is in your package manager - it's out of date. Go directly to the project website to download the latest version!

Usage

Cawling for "protips" is completed in three steps:

  1. Start by cloning the repository, it looks like this:

    $ tree -L 1
    .
    ├── subs
    ├── clips
    ├── tips
    ├── download-protips.py
    ├── download-subtitles.sh
    └── README.md
  2. Download auto-translated subtitles for every episode of the L1T news into the subs folder. This script uses the youtube playlists for every "season" of the news - for future seasons, add the playlist urls.

    $ bash download-subtitles.sh
  3. Search the subtitles downloaded in the previous step for the phrase "protips" and download clips at that timestamp. The clips will be saved into the clips folder.

    $ python download-protips.py

    This process involves downloading every episode with a protip so it's going to take a while and use a ton of bandwidth. I've hardcoded the limit to download the videos at <=1080p resolution, which speeds things up but it still takes hours. If your internet is slow (like mine) consider renting a VPC with gigabit internet and running it there!

At the end, you're left with a tips folder full of short video clips of all found the protips!

Results

The scripts certially work, but I can't be sure they find every last protip. I don't know if you can really be sure of the count without re-watching the entirity of the news. However, it does work well enough to make a fun supercut like this!

If you think you can improve the match-rate, feel free to fork and make improvements. Happy Devember 2020!

About

Automatically crawl the L1T news archive for their criminal pro tips!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published