[HeiseBridge] Fix multi-page article fetching (#1767)
Fixes multi-page article fetching by adding '&seite=all' to article URL.
This commit is contained in:
parent
55015f80cf
commit
712f60e910
1 changed files with 5 additions and 10 deletions
|
@ -40,18 +40,13 @@ class HeiseBridge extends FeedExpander {
|
|||
|
||||
protected function parseItem($feedItem) {
|
||||
$item = parent::parseItem($feedItem);
|
||||
$uri = $item['uri'];
|
||||
$uri = $item['uri'] . '&seite=all';
|
||||
|
||||
do {
|
||||
$article = getSimpleHTMLDOMCached($uri)
|
||||
or returnServerError('Could not open article: ' . $uri);
|
||||
$article = getSimpleHTMLDOMCached($uri)
|
||||
or returnServerError('Could not open article: ' . $uri);
|
||||
|
||||
$article = defaultLinkTo($article, $uri);
|
||||
$item = $this->addArticleToItem($item, $article);
|
||||
|
||||
if($next = $article->find('.pagination a[rel="next"]', 0))
|
||||
$uri = $next->href;
|
||||
} while ($next);
|
||||
$article = defaultLinkTo($article, $uri);
|
||||
$item = $this->addArticleToItem($item, $article);
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue