mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +02:00
refactor: FeedExpander::parseItem() descendants (#3744)
This commit is contained in:
parent
9bda9e246a
commit
382648fc22
46 changed files with 314 additions and 281 deletions
|
@ -12,12 +12,12 @@ class ForGifsBridge extends FeedExpander
|
|||
$this->collectExpandableDatas('https://forgifs.com/gallery/srss/7');
|
||||
}
|
||||
|
||||
protected function parseItem($feedItem)
|
||||
protected function parseItem($item)
|
||||
{
|
||||
$item = parent::parseItem($feedItem);
|
||||
$item = parent::parseItem($item);
|
||||
|
||||
$content = str_get_html($item['content']);
|
||||
$img = $content->find('img', 0);
|
||||
$dom = str_get_html($item['content']);
|
||||
$img = $dom->find('img', 0);
|
||||
$poster = $img->src;
|
||||
|
||||
// The actual gif is the same path but its id must be decremented by one.
|
||||
|
@ -34,7 +34,7 @@ class ForGifsBridge extends FeedExpander
|
|||
$img->width = 'auto';
|
||||
$img->height = 'auto';
|
||||
|
||||
$item['content'] = $content;
|
||||
$item['content'] = (string) $dom;
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue