[ 'category' => [ 'name' => 'Category', 'type' => 'text', 'description' => 'See examples for available options.', 'exampleValue' => 'can be empty, "selections" or "album-jazz-de-la-semaine"' ] ] ]; const XPATH_EXPRESSION_ITEM = '//div[starts-with(@class, "CardSide ")]'; const XPATH_EXPRESSION_ITEM_TITLE = './/a/@aria-label'; const XPATH_EXPRESSION_ITEM_CONTENT = './/img/@alt'; const XPATH_EXPRESSION_ITEM_URI = './/a/@href'; const XPATH_EXPRESSION_ITEM_AUTHOR = './/div[starts-with(@class, "title-zone ")]/p[2]/text()'; const XPATH_EXPRESSION_ITEM_TIMESTAMP = './/div[starts-with(@class, "AdditionalInfos ")]/p[1]/text()'; const XPATH_EXPRESSION_ITEM_ENCLOSURES = './/img/@src'; const XPATH_EXPRESSION_ITEM_CATEGORIES = './/div[starts-with(@class, "AdditionalInfos ")]/p[2]/text()'; public function getSourceUrl() { return self::URI . $this->getInput('category'); } public function getIcon() { return 'https://www.radiofrance.fr/dist/favicons/fip/favicon.png'; } protected function formatItemTimestamp($value) { $monthyear = explode(": ", $value)[1]; return $GLOBALS['DATE_FORMATTER']->parse('1 ' . $monthyear); } # enclosure links don't have an extension protected function cleanMediaUrl($mediaUrl) { return $mediaUrl; } }