mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-11 02:54:10 +02:00
bridges: use BridgeAbstract::getSimpleHTMLDOM
instead of BridgeAbstract::file_get_html Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -58,9 +58,9 @@ class ThePirateBayBridge extends BridgeAbstract{
|
||||
if (!isset($param['q']))
|
||||
$this->returnClientError('You must specify keywords (?q=...)');
|
||||
|
||||
$keywordsList = explode(";",$param['q']);
|
||||
$keywordsList = explode(";",$param['q']);
|
||||
foreach($keywordsList as $keywords){
|
||||
$html = $this->file_get_html('https://thepiratebay.org/search/'.rawurlencode($keywords).'/0/3/0') or $this->returnServerError('Could not request TPB.');
|
||||
$html = $this->getSimpleHTMLDOM('https://thepiratebay.org/search/'.rawurlencode($keywords).'/0/3/0') or $this->returnServerError('Could not request TPB.');
|
||||
|
||||
if ($html->find('table#searchResult', 0) == FALSE)
|
||||
$this->returnServerError('No result for query '.$keywords);
|
||||
|
Reference in New Issue
Block a user