From fc96e97d51c551148391f95ab0a46dc88773d0fb Mon Sep 17 00:00:00 2001 From: Quentin de Longraye Date: Sun, 13 Jan 2019 19:12:31 +0100 Subject: [PATCH] [N26Bridge] Add new bridge (#1006) https://n26.com --- bridges/N26Bridge.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 bridges/N26Bridge.php diff --git a/bridges/N26Bridge.php b/bridges/N26Bridge.php new file mode 100644 index 00000000..dd1c423c --- /dev/null +++ b/bridges/N26Bridge.php @@ -0,0 +1,37 @@ +find('div.ga') as $article) { + $item = []; + + $item['uri'] = self::URI . $article->find('h2 a', 0)->href; + $item['title'] = $article->find('h2 a', 0)->plaintext; + + $fullArticle = getSimpleHTMLDOM($item['uri']) + or returnServerError('Error while downloading the full article'); + + $dateElement = $fullArticle->find('span[class="fk fl de ch fm by"]', 0); + $item['timestamp'] = strtotime($dateElement->plaintext); + $item['content'] = $fullArticle->find('main article', 0)->innertext; + + $this->items[] = $item; + } + } +}