mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-23 06:56:53 +00:00
[GithubSearchBridge] Fixed indentation
This commit is contained in:
parent
903691b636
commit
88fdaf6984
@ -7,24 +7,24 @@ class GithubSearchBridge extends BridgeAbstract {
|
|||||||
const CACHE_TIMEOUT = 600; // 10min
|
const CACHE_TIMEOUT = 600; // 10min
|
||||||
const DESCRIPTION = 'Returns a specified repositories search (sorted by recently updated)';
|
const DESCRIPTION = 'Returns a specified repositories search (sorted by recently updated)';
|
||||||
const PARAMETERS = array( array(
|
const PARAMETERS = array( array(
|
||||||
's' => array(
|
's' => array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'name' => 'Search query'
|
'name' => 'Search query'
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
public function collectData(){
|
public function collectData(){
|
||||||
$params = array('utf8' => '✓',
|
$params = array('utf8' => '✓',
|
||||||
'q' => urlencode($this->getInput('s')),
|
'q' => urlencode($this->getInput('s')),
|
||||||
's' => 'updated',
|
's' => 'updated',
|
||||||
'o' => 'desc',
|
'o' => 'desc',
|
||||||
'type' => 'Repositories');
|
'type' => 'Repositories');
|
||||||
$url = self::URI . 'search?' . http_build_query($params);
|
$url = self::URI . 'search?' . http_build_query($params);
|
||||||
|
|
||||||
$html = getSimpleHTMLDOM($url)
|
$html = getSimpleHTMLDOM($url)
|
||||||
or returnServerError('Error while downloading the website content');
|
or returnServerError('Error while downloading the website content');
|
||||||
|
|
||||||
foreach($html->find('div.repo-list-item') as $element){
|
foreach($html->find('div.repo-list-item') as $element){
|
||||||
$item = array();
|
$item = array();
|
||||||
|
|
||||||
$uri = $element->find('h3 a', 0)->href;
|
$uri = $element->find('h3 a', 0)->href;
|
||||||
|
Loading…
Reference in New Issue
Block a user