pub / yt2html

Fetches Youtube content via RSS and provides a chronological timeline
git clone https://src.jayvii.de/pub/yt2html.git
Home | Log | Files | Exports | Refs | README | RSS

commit bef117d1e6cfe7d4c6107b7222e0c1b2196c6dd6
parent 95a41340cb01c36b8794cdd11f4b7464a5c530b4
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Tue, 19 Nov 2024 20:27:15 +0100

feat: filter shorts more aggressively

Diffstat:
Mindex.php | 13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/index.php b/index.php @@ -150,8 +150,17 @@ // Get Channel Name $video["author"] = $author; - /* check whether indications of a YouTube-Short exist, skip if it is */ - if(preg_match('/#short(s)*/', $video["desc"]) > 0) { + /* check whether indications of a YouTube-Short exist, skip if it is + * We assume video is a short if any of the following applies: + * has #short/#shorts in the title + * has #short #shorts in the description + * has no description at all + */ + if ( + preg_match('/#short(s)*/', $video["title"]) > 0 || + preg_match('/#short(s)*/', $video["desc"]) > 0 || + strlen($video["desc"]) == 0 + ) { continue; }