Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

feat: remove sponsors with sponsorblock

Christian Fei192b90906f82
diff --git a/README.md b/README.md
index a7de8ee..ae92776 100644
--- a/README.md
+++ b/README.md
@@ -69,11 +69,13 @@ Simply set the env variables to your needs, by following the format above (e.g.
- **Why not??**
- wanted to get back my chronological feed, instead of a "algorithmically curated" one
- you can just go to the "Subscriptions" page if you want to see your YouTube videos in chronological order, as [gently pointed out on HN](https://news.ycombinator.com/item?id=43374730)
+- native Picture-in-Picture support
- no distractions
- no clickbait thumbnails (using `mq2` instead of `mqdefault` thumbnail, thanks @drcheap)
- no comments
- no related videos, or any algorithmically determined videos pushed in your face
-- no ads (in "just skip the sponsors")
+- no ads
+- no sponsors, thanks to SponsorBlock
- just videos and a clean UI
- wanted to dabble with [Server-sent Events](https://github.com/christian-fei/my-yt/blob/main/lib/sse.js)
- wanted to try integrate the so much hyped AI in a personal project
diff --git a/lib/youtube.js b/lib/youtube.js
index 8667e03..b37059d 100644
--- a/lib/youtube.js
+++ b/lib/youtube.js
@@ -6,7 +6,7 @@ const fetchYoutubeHeaders = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36'
}
const subtitlesYTDLPArgs = `--write-subs --write-auto-subs --sub-format vtt --convert-subs srt -k`
-const videoYTDLPArgs = `--concurrent-fragments 5 -f best[ext=mp4]`
+const videoYTDLPArgs = `--concurrent-fragments 5 -f best[ext=mp4] --sponsorblock-remove sponsor`
function getOptionalCookiesPath() {
if (fs.existsSync('/app/cookies.txt')) return '/app/cookies.txt'