Merge branch 'methods2functions' of https://framagit.org/peetah/rss-bridge

This commit is contained in:
logmanoriginal 2016-10-02 16:05:58 +02:00
commit 970e216c1f
114 changed files with 899 additions and 904 deletions

View file

@ -33,15 +33,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);