mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[DavesTrailerPageBridge] Add timestamps to feed (#2456)
This commit is contained in:
parent
55acf661b9
commit
e0d99f2a84
@ -9,7 +9,14 @@ class DavesTrailerPageBridge extends BridgeAbstract {
|
|||||||
$html = getSimpleHTMLDOM(static::URI)
|
$html = getSimpleHTMLDOM(static::URI)
|
||||||
or returnClientError('No results for this query.');
|
or returnClientError('No results for this query.');
|
||||||
|
|
||||||
foreach ($html->find('tr[!align]') as $tr) {
|
$curr_date = null;
|
||||||
|
foreach ($html->find('tr') as $tr) {
|
||||||
|
// If it's a date row, update the current date
|
||||||
|
if ($tr->align == 'center') {
|
||||||
|
$curr_date = $tr->plaintext;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$item = array();
|
$item = array();
|
||||||
|
|
||||||
// title
|
// title
|
||||||
@ -21,6 +28,9 @@ class DavesTrailerPageBridge extends BridgeAbstract {
|
|||||||
// uri
|
// uri
|
||||||
$item['uri'] = $tr->find('a', 3)->getAttribute('href');
|
$item['uri'] = $tr->find('a', 3)->getAttribute('href');
|
||||||
|
|
||||||
|
// date: parsed by FeedItem using strtotime
|
||||||
|
$item['timestamp'] = $curr_date;
|
||||||
|
|
||||||
$this->items[] = $item;
|
$this->items[] = $item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user