diff --git a/bridges/WhydBridge.php b/bridges/WhydBridge.php index 5adfc98..bbaee2d 100644 --- a/bridges/WhydBridge.php +++ b/bridges/WhydBridge.php @@ -13,6 +13,8 @@ class WhydBridge extends BridgeAbstract{ ) )); + private $userName=''; + public function collectData(){ $html = ''; if (strlen(preg_replace("/[^0-9a-f]/",'', $this->getInput('u'))) == 24){ @@ -34,7 +36,7 @@ class WhydBridge extends BridgeAbstract{ } } } - $this->name = $html->find('div#profileTop', 0)->find('h1', 0)->plaintext; + $this->userName = $html->find('div#profileTop', 0)->find('h1', 0)->plaintext; for($i = 0; $i < 10; $i++) { $track = $html->find('div.post', $i); @@ -42,13 +44,13 @@ class WhydBridge extends BridgeAbstract{ $item['author'] = $track->find('h2', 0)->plaintext; $item['title'] = $track->find('h2', 0)->plaintext; $item['content'] = $track->find('a.thumb',0) . '
' . $track->find('h2', 0)->plaintext; - $item['id'] = 'http://www.whyd.com' . $track->find('a.no-ajaxy',0)->getAttribute('href'); - $item['uri'] = 'http://www.whyd.com' . $track->find('a.no-ajaxy',0)->getAttribute('href'); + $item['id'] = $this->uri . $track->find('a.no-ajaxy',0)->getAttribute('href'); + $item['uri'] = $this->uri . $track->find('a.no-ajaxy',0)->getAttribute('href'); $this->items[] = $item; } } public function getName(){ - return (!empty($this->name) ? $this->name .' - ' : '') .'Whyd Bridge'; + return (!empty($this->userName) ? $this->userName .' - ' : '') .'Whyd Bridge'; } public function getCacheDuration(){