diff --git a/bridges/VproTegenlichtBridge.php b/bridges/VproTegenlichtBridge.php new file mode 100644 index 00000000..3a71f9f0 --- /dev/null +++ b/bridges/VproTegenlichtBridge.php @@ -0,0 +1,43 @@ +find('ul#browsable-news-overview', 0); + + $dom = defaultLinkTo($dom, $this->getURI()); + foreach ($dom->find('li') as $article) { + $a = $article->find('a.complex-teaser', 0); + $title = $article->find('a.complex-teaser', 0)->title; + $url = $article->find('a.complex-teaser', 0)->href; + $author = "VPRO tegenlicht"; + $content = $article->find('p.complex-teaser-summary', 0)->plaintext; + $timestamp = strtotime($article->find('div.complex-teaser-data', 0)->plaintext); + + $item = [ + 'uri' => $url, + 'author' => $author, + 'title' => $title, + 'timestamp' => $timestamp, + 'content' => $content + ]; + + $this->items[] = $item; + } + } +}