pub / stories

Top News Aggregator
git clone src.jayvii.de/pub/stories.git
Home | Log | Files | Exports | Refs | RSS

commit 51604b5d158beaf60c35260af0e7d354fbced9ef
parent 746ec61e29168ca5a6c4159b043fa85dd8bcddaa
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Mon,  2 Nov 2026 22:13:03 +0100

fix: allow all kinds of quotation around the property

Diffstat:
Mignore.json | 3++-
Mlib/og_image.php | 5+++--
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ignore.json b/ignore.json @@ -2,6 +2,7 @@ "url": [ ".*sportschau.de\\/.*", ".*\\/sport\\/.*", - ".*\\/panorama\\/.*" + ".*\\/panorama\\/.*", + ".*\\/kultur\\/.*" ] } diff --git a/lib/og_image.php b/lib/og_image.php @@ -1,7 +1,8 @@ <?php // Fetch site HTML -$url = urldecode($_GET["url"]); +// $url = urldecode($_GET["url"]); +$url = "https://www.sueddeutsche.de/bayern/nuernberg-bayern-bergrettung-oesterreich-li.3572991"; $html = explode( ">", file_get_contents($url) @@ -10,7 +11,7 @@ $html = explode( // If HTML could be fetched, extract lines with og:image if (!empty($html)) { $image_lines = preg_grep( - '/property="og:image"/', + '/property=(\'|")*og:image(\'|")*/', $html ); $image_url = preg_replace(