0
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-04 04:22:55 +00:00

Add title and alt text to Oglaf feed

This commit is contained in:
Aleksei Besogonov 2024-11-16 16:55:00 -08:00
parent 6c86e2c1f7
commit b07a110028
No known key found for this signature in database
GPG Key ID: 4BBFA4A7A13B161F

View File

@ -28,7 +28,9 @@ class OglafBridge extends FeedExpander
{ {
$html = getSimpleHTMLDOMCached($item['uri']); $html = getSimpleHTMLDOMCached($item['uri']);
$comicImage = $html->find('img[id="strip"]', 0); $comicImage = $html->find('img[id="strip"]', 0);
$item['content'] = $comicImage; $alt = $comicImage->getAttribute("alt");
$title = $comicImage->getAttribute("title");
$item['content'] = $comicImage . "<h3>Alt: {$alt}</h3><h3>Title: {$title}</h3>";
return $item; return $item;
} }