mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-26 17:44:49 +02:00
[core] extract BridgeAbstract methods to make them functions
- returnError, returnServerError, returnClientError ,debugMessage are moved to lib/error.php - getContents, getSimpleHTMLDOM, getSimpleHTMLDOMCached are moved to lib/contents.php Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -32,15 +32,15 @@ class SuperbWallpapersBridge extends BridgeAbstract {
|
||||
|
||||
// Get last page number
|
||||
$link = self::URI.'/'.$category.'/9999.html';
|
||||
$html = $this->getSimpleHTMLDOM($link)
|
||||
or $this->returnServerError('Could not load '.$link);
|
||||
$html = getSimpleHTMLDOM($link)
|
||||
or returnServerError('Could not load '.$link);
|
||||
|
||||
$lastpage = min($html->find('.paging .cpage', 0)->innertext(), ceil($max/36));
|
||||
|
||||
for ($page = 1; $page <= $lastpage; $page++) {
|
||||
$link = self::URI.'/'.$category.'/'.$page.'.html';
|
||||
$html = $this->getSimpleHTMLDOM($link)
|
||||
or $this->returnServerError('No results for this query.');
|
||||
$html = getSimpleHTMLDOM($link)
|
||||
or returnServerError('No results for this query.');
|
||||
|
||||
foreach($html->find('.wpl .i a') as $element) {
|
||||
$thumbnail = $element->find('img', 0);
|
||||
|
Reference in New Issue
Block a user