mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-10-27 13:30:28 +01:00
[GolemBridge] Actually fix pagination
Commit3f33d0e312modified the logic to accommodate for the website change. The commitd00745c411broke pagination again by removing the pagination elements from the article content. This commit finally fixes pagination again by doing all pre-processing before calling `extractContent()`. Tested with the following articles: https://www.golem.de/news/supercomputer-jupiter-eingeweiht-europaeisch-ist-hochleistungsrechnen-richtig-gedacht-2509-199789.html https://www.golem.de/news/ankers-soundcore-sleep-a30-im-praxistest-diese-anc-stoepsel-verbessern-meinen-schlaf-2509-199735.html
This commit is contained in:
@@ -94,15 +94,16 @@ class GolemBridge extends FeedExpander
|
||||
}
|
||||
}
|
||||
|
||||
$item['content'] .= $this->extractContent($articlePage, $item['content']);
|
||||
|
||||
// next page
|
||||
$nextUri = $articlePage->find('li.go-pagination__item--next>a', 0);
|
||||
$nextUri = $articlePage->find('li.go-pagination__item--next a', 0);
|
||||
if ($nextUri) {
|
||||
$uri = $nextUri->href;
|
||||
} else {
|
||||
$uri = null;
|
||||
}
|
||||
|
||||
// Only extract the content (and remove content) after all pre-processing is done
|
||||
$item['content'] .= $this->extractContent($articlePage, $item['content']);
|
||||
}
|
||||
|
||||
return $item;
|
||||
|
||||
Reference in New Issue
Block a user