forked from RSS-Bridge/rss-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeutscherAeroClubBridge.php
28 lines (24 loc) · 1.13 KB
/
DeutscherAeroClubBridge.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
class DeutscherAeroClubBridge extends XPathAbstract
{
const NAME = 'Deutscher Aero Club';
const URI = 'https://www.daec.de/news/';
const DESCRIPTION = 'News aus Luftsport und Dachverband';
const MAINTAINER = 'hleskien';
const FEED_SOURCE_URL = 'https://www.daec.de/news/';
const XPATH_EXPRESSION_FEED_ICON = './/link[@rel="icon"][1]/@href';
const XPATH_EXPRESSION_ITEM = '//div[contains(@class, "news-list-view")]/div[contains(@class, "article")]';
const XPATH_EXPRESSION_ITEM_TITLE = './/span[@itemprop="headline"]';
const XPATH_EXPRESSION_ITEM_CONTENT = './/div[@itemprop="description"]/p';
const XPATH_EXPRESSION_ITEM_URI = './/div[@class="news-header"]//a/@href';
//const XPATH_EXPRESSION_ITEM_AUTHOR = './/';
const XPATH_EXPRESSION_ITEM_TIMESTAMP = './/time/@datetime';
const XPATH_EXPRESSION_ITEM_ENCLOSURES = './/img/@src';
//const XPATH_EXPRESSION_ITEM_CATEGORIES = './/';
protected function formatItemTimestamp($value)
{
$dti = DateTimeImmutable::createFromFormat('Y-m-d', $value);
$dti = $dti->setTime(0, 0, 0);
return $dti->getTimestamp();
}
}