mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 10:04:54 +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:
parent
f43bbda83e
commit
3c0d13c1bb
121 changed files with 1212 additions and 396 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue