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 95a41340cb01c36b8794cdd11f4b7464a5c530b4
parent ea9b8df23a250164dffbfaea4e13cfc578130fc9
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Mon, 11 Nov 2024 19:05:33 +0100

feat: skip YouTube Shorts

Diffstat:
Mindex.php | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/index.php b/index.php @@ -137,6 +137,9 @@ "<br>", preg_replace("/\n+/", "\n", $entry["media_group"]["media_description"]) ); + if (empty($video["desc"])) { + $video["desc"] = ""; + } // Get Time $video["time"] = strtotime($entry["published"]); @@ -147,6 +150,11 @@ // 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) { + continue; + } + /* Add video to videos array */ array_push($videos, $video);