diff --git a/bridges/FragDenStaatBridge.php b/bridges/FragDenStaatBridge.php deleted file mode 100644 index aee1885ce2f..00000000000 --- a/bridges/FragDenStaatBridge.php +++ /dev/null @@ -1,78 +0,0 @@ - [ - 'name' => 'Query Limit', - 'title' => 'Amount of articles to query', - 'type' => 'number', - 'defaultValue' => 5, - ], - ] ]; - - protected function parseTeaser($teaser) - { - $result = []; - - $header = $teaser->find('h3 > a', 0); - $result['title'] = $header->plaintext; - $result['uri'] = static::URI . $header->href; - $result['enclosures'] = []; - $result['enclosures'][] = $teaser->find('img', 0)->src; - $result['uid'] = hash('sha256', $result['title']); - $result['timestamp'] = strtotime($teaser->find('time', 0)->getAttribute('datetime')); - - return $result; - } - - public function collectData() - { - $html = getSimpleHTMLDOM(self::URI . '/artikel/exklusiv/'); - - $queryLimit = (int) $this->getInput('qLimit'); - if ($queryLimit > 12) { - $queryLimit = 12; - } - - $teasers = []; - - $teaserElements = $html->find('article'); - - for ($i = 0; $i < $queryLimit; $i++) { - array_push($teasers, $this->parseTeaser($teaserElements[$i])); - } - - foreach ($teasers as $article) { - $articleHtml = getSimpleHTMLDOMCached($article['uri'], static::CACHE_TIMEOUT * 6); - $articleCore = $articleHtml->find('article.blog-article', 0); - - $content = ''; - - $lead = $articleCore->find('div.lead > p', 0)->innertext; - - $content .= '