[DilbertBridge] Fixed URI and item title (#976)

This commit is contained in:
fulmeek 2018-12-26 21:11:45 +01:00 committed by LogMANOriginal
parent 10659dd453
commit 185a773e74
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ class DilbertBridge extends BridgeAbstract {
const MAINTAINER = 'kranack';
const NAME = 'Dilbert Daily Strip';
const URI = 'http://dilbert.com';
const URI = 'https://dilbert.com';
const CACHE_TIMEOUT = 21600; // 6h
const DESCRIPTION = 'The Unofficial Dilbert Daily Comic Strip';
@ -17,9 +17,9 @@ class DilbertBridge extends BridgeAbstract {
$img = $element->find('img', 0);
$link = $element->find('a', 0);
$comic = $img->src;
$title = $link->alt;
$title = $img->alt;
$url = $link->href;
$date = substr($url, 25);
$date = substr(strrchr($url, '/'), 1);
if (empty($title))
$title = 'Dilbert Comic Strip on ' . $date;
$date = strtotime($date);