Skip to content

Instantly share code, notes, and snippets.

View TangentFoxy's full-sized avatar

Rose Liverman TangentFoxy

View GitHub Profile
@TangentFoxy
TangentFoxy / invidious-bookmarklet.js
Last active August 17, 2023 06:52 — forked from hisaac/invidious-bookmarklet.js
Modified for personal use. Points to my own domain.
// The bookmarklet does a couple things:
// If the current page in the browser is a YouTube page, it will open that video in `invidious.xyz`
// If the current page in the browser is _not_ a YouTube page, it will open the `invidious.xyz` homepage
//
// To use: Copy/Paste the code below into the bookmark's address:
javascript:location.hostname.includes("youtube.com")?location.assign("https://invidious.tangentfox.com"+location.pathname+location.search+location.hash):location.assign("https://invidious.tangentfox.com");
@TangentFoxy
TangentFoxy / vtt2text.py
Created August 17, 2023 06:45 — forked from glasslion/vtt2text.py
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.