From 876d3c8ae73f13068216058ba238e47b7912580d Mon Sep 17 00:00:00 2001
From: Lukas Nabakowski <55393142+nabakolu@users.noreply.github.com>
Date: Fri, 15 Aug 2025 16:46:32 +0200
Subject: [PATCH] [ZDFMediathekBridge] add bridge (#4672)
* Add ZDFMediathekBridge
* Declare strict types = 1
---
bridges/ZDFMediathekBridge.php | 72 ++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 bridges/ZDFMediathekBridge.php
diff --git a/bridges/ZDFMediathekBridge.php b/bridges/ZDFMediathekBridge.php
new file mode 100644
index 00000000..3a5ac8d9
--- /dev/null
+++ b/bridges/ZDFMediathekBridge.php
@@ -0,0 +1,72 @@
+ [
+ 'name' => 'ZDF Show URL',
+ 'type' => 'text',
+ 'required' => true,
+ 'exampleValue' => 'https://www.zdf.de/magazine/zdfheute-live-102'
+ ]
+ ]
+ ];
+
+ public function collectData()
+ {
+ $url = $this->getInput('path');
+ $data = $this->getJSON($url);
+
+ foreach ($data['value']['data']['smartCollectionByCanonical']['seasons']['nodes'][0]['episodes']['nodes'] as $episode_node) {
+ $item = [];
+ $item['title'] = $episode_node['title'];
+ $item['timestamp'] = strtotime($episode_node['editorialDate']);
+ $item['uri'] = $episode_node['sharingUrl'];
+ $item['uid'] = $episode_node['id'];
+
+ $description = $episode_node['teaser']['description'];
+ $image = $episode_node['teaser']['imageWithoutLogo']['layouts']['dim1920X1080'];
+ $image_desc = $episode_node['teaser']['imageWithoutLogo']['altText'];
+
+ $item['content'] = "
{$description}
"; + + $this->items[] = $item; + } + } + + private function getJSON($url) + { + $html = getContents($url); + + // Find all