Skip to content

Commit

Permalink
Update GithubSearchBridge.php (RSS-Bridge#1431)
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Turmel authored Jan 31, 2020
1 parent 72b4fe8 commit 9dbd211
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bridges/GithubSearchBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ public function collectData(){
foreach($html->find('li.repo-list-item') as $element) {
$item = array();

$uri = $element->find('h3 a', 0)->href;
$uri = $element->find('.f4 a', 0)->href;
$uri = substr(self::URI, 0, -1) . $uri;
$item['uri'] = $uri;

$title = $element->find('h3', 0)->plaintext;
$title = $element->find('.f4', 0)->plaintext;
$item['title'] = $title;

// Description
if (count($element->find('p.d-inline-block')) != 0) {
$content = $element->find('p.d-inline-block', 0)->innertext;
if (count($element->find('p.mb-1')) != 0) {
$content = $element->find('p.mb-1', 0)->innertext;
} else{
$content = 'No description';
}
Expand Down

0 comments on commit 9dbd211

Please sign in to comment.