YouTube不仅可以用于娱乐,还可以用于学习任何东西。
YouTube上的推荐会非常有用,因为它们可以将相关视频提示到当前,但它们也很危险,因为它们原则上包含有趣且令人分心的视频(而不是视频主题)。

在某些时候,您只是厌倦了观看有关某个主题的视频,而在这里您会被分散注意力的建议所吸引,因为如果您花更多的时间在YouTube上吸引其他任何内容,就会更有收益。因此,冲浪浪费了时间。
拟议的解决方案
您可以将YouTube帐户分开(用于培训和娱乐),但是不幸的是,这不建议抛出不适当的视频,因为推荐系统不仅向您而且还向所有用户学习,这意味着每个人都必须遵循此策略。
因此,我决定您可以尝试做一些会阻止非主题建议的事情。
想法实施
首先想到的是机器学习,文本分类等。
. , — .
, "-" , .
— chrome , , . , .
Chrome . manifest.json:
"content_scripts": [
{
"matches": ["https://www.youtube.com/*"],
"css": ["styles.css"],
"js": ["page-script.js"]
}
],
, . :
document.querySelector('h1'),
document.querySelector('#description'),
document.querySelectorAll('ytd-compact-video-renderer')
css , :
.youtube-stay-focused__blur {
filter: blur(5px) grayscale(100%);
opacity: 0.3;
}
.youtube-stay-focused__blur:hover {
filter: none;
opacity: 1;
}

, .
.
TF-IDF, BM25 , 0.

. , , ( ).
"" .
"":
- , ..;
- ;
- "#", "$", ..;
- , ;
- ;
- , trailer, audio, video ..;
:
" ?"
=>
["", "", "", "", "", "", "?"]
- , .. :
, , , , =>
, . , , .
. npm . natural, https://www.npmjs.com/package/natural, nodejs ( fshttps://www.npmjs.com/package/fs), !
const porterStemmerRu = require('natural/lib/natural/stemmers/porter_stemmer_ru');
const porterStemmer = require('natural/lib/natural/stemmers/porter_stemmer');
const stem = (words) =>
words
.map((word) => porterStemmerRu.stem(word))
.map((word) => porterStemmer.stem(word));
" ?"
=>
["", "", "", "", ""]
.
.
Chrome YouTube.

.
在正式的Chrome市场上发布,您可以立即安装并尝试其工作方式:https:
//chrome.google.com/webstore/detail/youtube-stay-focused/enhfmpfmofdnhelhegdjanoaomlcieen
谁知道如何在评论或贡献者中受到更好的欢迎;)
感谢您的时间。