mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-23 08:33:24 +02:00
[core] store parameters values in BridgeAbstract::parameters
This way, any BridgeAbstract method can now have access to these values, no only collectData Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -15,13 +15,14 @@ class RTBFBridge extends BridgeAbstract {
|
||||
);
|
||||
}
|
||||
|
||||
public function collectData(array $param) {
|
||||
public function collectData(){
|
||||
$param=$this->parameters[$this->queriedContext];
|
||||
$html = '';
|
||||
$limit = 10;
|
||||
$count = 0;
|
||||
|
||||
if (isset($param['c'])) {
|
||||
$html = $this->getSimpleHTMLDOM('http://www.rtbf.be/auvio/emissions/detail?id='.$param['c']) or $this->returnServerError('Could not request RTBF.');
|
||||
if (isset($param['c']['value'])) {
|
||||
$html = $this->getSimpleHTMLDOM('http://www.rtbf.be/auvio/emissions/detail?id='.$param['c']['value']) or $this->returnServerError('Could not request RTBF.');
|
||||
|
||||
foreach($html->find('section[id!=widget-ml-avoiraussi-] .rtbf-media-grid article') as $element) {
|
||||
if($count < $limit) {
|
||||
|
Reference in New Issue
Block a user