From b21806a0b3563546ce418aa276afbaa24ebabad8 Mon Sep 17 00:00:00 2001 From: somini Date: Sat, 28 Jan 2023 06:39:59 +0000 Subject: [PATCH] [TheRedHandFiles]: New Bridge (#3229) This blog had a feed, is updated irregularly, and someone disabled the feed on the Wordpress config on purpose for some reason. :( --- bridges/TheRedHandFilesBridge.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 bridges/TheRedHandFilesBridge.php diff --git a/bridges/TheRedHandFilesBridge.php b/bridges/TheRedHandFilesBridge.php new file mode 100644 index 00000000..ec74af80 --- /dev/null +++ b/bridges/TheRedHandFilesBridge.php @@ -0,0 +1,29 @@ +getURI()); + + foreach ($html->find('#main article.posts__article') as $element) { + $item = []; + + $html_title = $element->find('h2', 0); + $html_subtitle = $element->find('h3', 0); + $html_image = $element->find('.posts__article-img', 0); + + $item['title'] = $html_subtitle->plaintext; + $item['uri'] = $html_title->find('a', 0)->href; + $item['content'] = $html_image->innertext . $html_title->plaintext; + + $this->items[] = $item; + } + } +}