From b5d9742a2176506a459137d54fdd28f26e3a62ca Mon Sep 17 00:00:00 2001
From: sal0max
Date: Tue, 6 Jul 2021 15:00:19 +0200
Subject: [PATCH] [NikonDownloadCenterBridge] Add bridge (#2195)
---
bridges/NikonDownloadCenterBridge.php | 44 +++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 bridges/NikonDownloadCenterBridge.php
diff --git a/bridges/NikonDownloadCenterBridge.php b/bridges/NikonDownloadCenterBridge.php
new file mode 100644
index 00000000..88b33c41
--- /dev/null
+++ b/bridges/NikonDownloadCenterBridge.php
@@ -0,0 +1,44 @@
+getURI());
+
+ foreach ($html->find('dd>ul>li') as $element) {
+ $date = $element->find('.date', 0)->plaintext;
+ $productType = $element->find('.icon>img', 0)->alt;
+ $desc = $element->find('p>a', 0)->plaintext;
+ $link = urljoin(self::URI, $element->find('p>a', 0)->href);
+
+ $item = array(
+ 'title' => $desc,
+ 'uri' => $link,
+ 'timestamp' => strtotime($date),
+ 'content' => <<
+ New/updated {$productType}:
+ {$desc}
+
+
+ {$date}
+
+EOD
+ );
+ $this->items[] = $item;
+ }
+ }
+}