mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-23 06:56:53 +00:00
Fix RainbowSixSiegeBridge coding style
This commit is contained in:
parent
0a361a4c68
commit
fa85267f69
@ -8,18 +8,20 @@ class RainbowSixSiegeBridge extends BridgeAbstract {
|
|||||||
const DESCRIPTION = 'Latest articles from the Rainbow Six Siege blog';
|
const DESCRIPTION = 'Latest articles from the Rainbow Six Siege blog';
|
||||||
|
|
||||||
public function collectData(){
|
public function collectData(){
|
||||||
$jsonString = getContents("https://prod-tridionservice.ubisoft.com/live/v1/News/Latest?templateId=tcm%3A152-76778-32&pageIndex=0&pageSize=10&language=en-US&detailPageId=tcm%3A152-194572-64&keywordList=175426&siteId=undefined&useSeoFriendlyUrl=true")
|
$jsonString = getContents("https://prod-tridionservice.ubisoft.com/live/v1/News/Latest?templateId=tcm%3A152-7677" .
|
||||||
|
"8-32&pageIndex=0&pageSize=10&language=en-US&detailPageId=tcm%3A152-194572-64" .
|
||||||
|
"&keywordList=175426&siteId=undefined&useSeoFriendlyUrl=true")
|
||||||
or returnServerError('Error while downloading the website content');
|
or returnServerError('Error while downloading the website content');
|
||||||
|
|
||||||
$json = json_decode($jsonString, true);
|
$json = json_decode($jsonString, true);
|
||||||
$json = $json['items'];
|
$json = $json['items'];
|
||||||
|
|
||||||
// Start at index 2 to remove highlighted articles
|
// Start at index 2 to remove highlighted articles
|
||||||
for($i = 0; $i < count($json); $i++){
|
for($i = 0; $i < count($json); $i++){
|
||||||
$jsonItem = $json[$i]['Content'];
|
$jsonItem = $json[$i]['Content'];
|
||||||
$article = str_get_html($jsonItem);
|
$article = str_get_html($jsonItem);
|
||||||
|
|
||||||
$item = array();
|
$item = array();
|
||||||
|
|
||||||
$uri = $article->find('h3 a', 0)->href;
|
$uri = $article->find('h3 a', 0)->href;
|
||||||
$uri = 'https://rainbow6.ubisoft.com' . $uri;
|
$uri = 'https://rainbow6.ubisoft.com' . $uri;
|
||||||
@ -31,4 +33,4 @@ class RainbowSixSiegeBridge extends BridgeAbstract {
|
|||||||
$this->items[] = $item;
|
$this->items[] = $item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user