mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue