Update GithubSearchBridge.php (#1431)

Fixes #1430
This commit is contained in:
Antoine Turmel 2020-01-31 15:01:46 +01:00 committed by GitHub
parent 2450f80823
commit f52eb43f8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -27,16 +27,16 @@ class GithubSearchBridge extends BridgeAbstract {
foreach($html->find('li.repo-list-item') as $element) { foreach($html->find('li.repo-list-item') as $element) {
$item = array(); $item = array();
$uri = $element->find('h3 a', 0)->href; $uri = $element->find('.f4 a', 0)->href;
$uri = substr(self::URI, 0, -1) . $uri; $uri = substr(self::URI, 0, -1) . $uri;
$item['uri'] = $uri; $item['uri'] = $uri;
$title = $element->find('h3', 0)->plaintext; $title = $element->find('.f4', 0)->plaintext;
$item['title'] = $title; $item['title'] = $title;
// Description // Description
if (count($element->find('p.d-inline-block')) != 0) { if (count($element->find('p.mb-1')) != 0) {
$content = $element->find('p.d-inline-block', 0)->innertext; $content = $element->find('p.mb-1', 0)->innertext;
} else{ } else{
$content = 'No description'; $content = 'No description';
} }