mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-18 14:22:38 +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:
@@ -47,12 +47,12 @@ class SuperbWallpapersBridge extends BridgeAbstract {
|
||||
|
||||
// Get last page number
|
||||
$link = $baseUri.'/'.$this->category.'/9999.html';
|
||||
$html = $this->file_get_html($link);
|
||||
$html = $this->getSimpleHTMLDOM($link);
|
||||
$lastpage = min($html->find('.paging .cpage', 0)->innertext(), ceil($max/36));
|
||||
|
||||
for ($page = 1; $page <= $lastpage; $page++) {
|
||||
$link = $baseUri.'/'.$this->category.'/'.$page.'.html';
|
||||
$html = $this->file_get_html($link) or $this->returnServerError('No results for this query.');
|
||||
$html = $this->getSimpleHTMLDOM($link) or $this->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