1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-10-27 05:21:34 +01:00

[GolemBridge] Actually fix pagination

Commit 3f33d0e312 modified the logic to
accommodate for the website change.
The commit d00745c411 broke
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:
Mynacol
2025-09-05 15:12:00 +00:00
parent 47184f8f03
commit 8c86c78691

View File

@@ -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;