Skip to content

Commit

Permalink
fix(codeberg): css selector tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
dvikan committed Dec 13, 2023
1 parent 0c4b498 commit 71ab9c2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions bridges/CodebergBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 71ab9c2

Please sign in to comment.