mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-17 14:18:35 +01:00
[WorldOfTanksBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
23bb5c5dfb
commit
6e3f08e9d3
@ -27,11 +27,7 @@ class WorldOfTanksBridge extends HttpCachingBridgeAbstract{
|
||||
));
|
||||
|
||||
function getURI(){
|
||||
$lang='fr';
|
||||
if (!empty($this->getInput('lang'))) {
|
||||
$lang = $this->getInput('lang');
|
||||
}
|
||||
|
||||
$lang = $this->getInput('lang');
|
||||
$uri = $this->uri.$lang.'/news/';
|
||||
if(!empty($this->getInput('category'))) {
|
||||
$uri .= 'pc-browser/'.$this->getInput('category')."/";
|
||||
@ -40,7 +36,8 @@ class WorldOfTanksBridge extends HttpCachingBridgeAbstract{
|
||||
}
|
||||
|
||||
public function collectData(){
|
||||
$html = $this->getSimpleHTMLDOM($this->getURI()) or $this->returnServerError('Could not request '.$this->getURI());
|
||||
$html = $this->getSimpleHTMLDOM($this->getURI())
|
||||
or $this->returnServerError('Could not request '.$this->getURI());
|
||||
$this->debugMessage("loaded HTML from ".$this->getURI());
|
||||
// customize name
|
||||
$this->name = $html->find('title', 0)->innertext;
|
||||
|
Loading…
x
Reference in New Issue
Block a user