YouTube: Remove Videos Based on Duration

Remove too short or too long videos from your YouTube's recommendation

Author
kuronekozero
Daily installs
0
Total installs
25
Ratings
0 0 0
Version
0.1
Created
2023-10-29
Updated
2023-10-29
License
MIT
Applies to

YouTube: Remove Videos Based on Duration

This Tampermonkey script is designed to customize your YouTube recommendations by removing videos that are either too short or too long. It operates by scanning the videos in your YouTube recommendations and removing any that do not fall within the specified duration range.

Videos like this will be removed:

How does it work?

The script works by scanning the videos in your YouTube recommendations and removing any that are shorter than a specified minimum duration or longer than a specified maximum duration. By default, these durations are set to remove videos shorter than 1 minute and longer than 1 hour(by default max duration is disabled), but these can be easily adjusted to suit your preferences.

Customizing the Duration Thresholds

To adjust the duration thresholds, you need to modify the values of minDuration and/or maxDuration in the script. For instance, if you want to remove videos shorter than 2 minutes and longer than 20 minutes, you would change:

var minDuration = "1:00"; // Minimum duration
var maxDuration = "10:00"; // Maximum duration

to:

var minDuration = "2:00"; // Minimum duration
var maxDuration = "20:00"; // Maximum duration

If you only want to remove videos that are shorter than a certain duration, you can comment out the maxDuration line. Similarly, if you only want to remove videos that are longer than a certain duration, you can comment out the minDuration line.

License

This project is licensed under the terms of the MIT license.