[HeiseBridge] Fix multi-page article fetching (#1767)

Fixes multi-page article fetching by adding '&seite=all' to  article URL.
This commit is contained in:
Joseph 2020-10-09 18:55:28 +00:00 committed by GitHub
parent 55015f80cf
commit 712f60e910
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,18 +40,13 @@ class HeiseBridge extends FeedExpander {
protected function parseItem($feedItem) { protected function parseItem($feedItem) {
$item = parent::parseItem($feedItem); $item = parent::parseItem($feedItem);
$uri = $item['uri']; $uri = $item['uri'] . '&seite=all';
do { $article = getSimpleHTMLDOMCached($uri)
$article = getSimpleHTMLDOMCached($uri) or returnServerError('Could not open article: ' . $uri);
or returnServerError('Could not open article: ' . $uri);
$article = defaultLinkTo($article, $uri); $article = defaultLinkTo($article, $uri);
$item = $this->addArticleToItem($item, $article); $item = $this->addArticleToItem($item, $article);
if($next = $article->find('.pagination a[rel="next"]', 0))
$uri = $next->href;
} while ($next);
return $item; return $item;
} }