From 8c86c7869110444ae1832617c4bbdb8a163b845f Mon Sep 17 00:00:00 2001 From: Mynacol Date: Fri, 5 Sep 2025 15:12:00 +0000 Subject: [PATCH] [GolemBridge] Actually fix pagination Commit 3f33d0e31206c4313278438dbe5454bbf0db43fc modified the logic to accommodate for the website change. The commit d00745c41113894e54f3ff71d73006410e3e9e20 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 --- bridges/GolemBridge.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bridges/GolemBridge.php b/bridges/GolemBridge.php index b6d583bb..f122aae0 100644 --- a/bridges/GolemBridge.php +++ b/bridges/GolemBridge.php @@ -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;