From 71ab9c21711068c4920d61bfa1803ae83bf0fb6e Mon Sep 17 00:00:00 2001 From: Dag Date: Wed, 13 Dec 2023 22:17:26 +0100 Subject: [PATCH] fix(codeberg): css selector tweak --- bridges/CodebergBridge.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bridges/CodebergBridge.php b/bridges/CodebergBridge.php index 2a450477340..0416f439cde 100644 --- a/bridges/CodebergBridge.php +++ b/bridges/CodebergBridge.php @@ -79,9 +79,9 @@ class CodebergBridge extends BridgeAbstract public function collectData() { - $html = getSimpleHTMLDOM($this->getURI()); - - $html = defaultLinkTo($html, $this->getURI()); + $url = $this->getURI(); + $html = getSimpleHTMLDOM($url); + $html = defaultLinkTo($html, $url); switch ($this->queriedContext) { case 'Commits': @@ -205,22 +205,22 @@ private function extractCommits($html) */ private function extractIssues($html) { - $div = $html->find('div.issue.list', 0); + $div = $html->find('div#issue-list', 0); - foreach ($div->find('li.item') as $li) { + foreach ($div->find('div.flex-item') as $li) { $item = []; $number = trim($li->find('a.index,ml-0.mr-2', 0)->plaintext); - $item['title'] = $li->find('a.title', 0)->plaintext . ' (' . $number . ')'; - $item['uri'] = $li->find('a.title', 0)->href; + $item['title'] = $li->find('a.issue-title', 0)->plaintext . ' (' . $number . ')'; + $item['uri'] = $li->find('a.issue-title', 0)->href; $time = $li->find('relative-time.time-since', 0); if ($time) { $item['timestamp'] = $time->datetime; } - $item['author'] = $li->find('div.desc', 0)->find('a', 1)->plaintext; + //$item['author'] = $li->find('div.desc', 0)->find('a', 1)->plaintext; // Fetch issue page $issuePage = getSimpleHTMLDOMCached($item['uri'], 3600);