From 086ef7f8a7edba3697c976ffc8cef2fcd24578db Mon Sep 17 00:00:00 2001 From: Matt Connell Date: Sat, 23 Nov 2024 18:12:36 +0000 Subject: [PATCH] feat: add WKYT bridge (#4337) --- bridges/WKYTNewsBridge.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 bridges/WKYTNewsBridge.php diff --git a/bridges/WKYTNewsBridge.php b/bridges/WKYTNewsBridge.php new file mode 100644 index 00000000..e3b95f00 --- /dev/null +++ b/bridges/WKYTNewsBridge.php @@ -0,0 +1,27 @@ +find('.card-body'); + + foreach ($articles as $article) { + $item = []; + $url = $article->find('.headline a', 0); + $item['uri'] = $url->href; + $item['title'] = trim($url->plaintext); + $item['author'] = $article->find('.author', 0)->plaintext; + $item['content'] = $article->find('.deck', 0)->plaintext; + $this->items[] = $item; + } + } +}