From ce831333a24011d0692f6871047fe74eab9fab8c Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 29 Nov 2026 17:24:18 +0100 Subject: initial commit --- .../web/rss/DeutschLernenDeutscheWelleBridge.php | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 config/services/web/rss/DeutschLernenDeutscheWelleBridge.php (limited to 'config/services/web/rss/DeutschLernenDeutscheWelleBridge.php') diff --git a/config/services/web/rss/DeutschLernenDeutscheWelleBridge.php b/config/services/web/rss/DeutschLernenDeutscheWelleBridge.php new file mode 100644 index 0000000..710f8e6 --- /dev/null +++ b/config/services/web/rss/DeutschLernenDeutscheWelleBridge.php @@ -0,0 +1,39 @@ + [ + 'id' => [ + 'name' => 'Identifier', + 'type' => 'text', + 'description' => 'An identifier of the shape [a-z]-[0-9]*. Found at the end of the target URL.', + 'exampleValue' => 's-60040484' + ] + ] + ]; + + const XPATH_EXPRESSION_ITEM = '//div[@class="teaser-wrap"]/a'; + const XPATH_EXPRESSION_ITEM_TITLE = './@title'; + const XPATH_EXPRESSION_ITEM_URI = './@href'; + // not given + // const XPATH_EXPRESSION_ITEM_AUTHOR = + const XPATH_EXPRESSION_ITEM_TIMESTAMP = './/time/@datetime'; + // requires javascript + // const XPATH_EXPRESSION_ITEM_ENCLOSURES = './figure/img[2]/@src'; + const XPATH_EXPRESSION_ITEM_CATEGORIES = './div[2]/span[1]/text()'; + + + public function getIcon() { + return 'https://learngerman.dw.com/favicon.png'; + } + + public function getSourceUrl() { + return self::URI . $this->getInput('id'); + } +} -- cgit v1.3.1