From efe66c3a20dfdb2e1ad80aa5380e5703dface0db Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 24 Sep 2023 12:13:15 +0200 Subject: services: rss-bridge: remove whatsonmubi bridge --- config/services/web/rss/WhatsOnMubiBridge.php | 49 --------------------------- config/services/web/rss/default.nix | 4 --- 2 files changed, 53 deletions(-) delete mode 100644 config/services/web/rss/WhatsOnMubiBridge.php (limited to 'config') diff --git a/config/services/web/rss/WhatsOnMubiBridge.php b/config/services/web/rss/WhatsOnMubiBridge.php deleted file mode 100644 index 4cf7718..0000000 --- a/config/services/web/rss/WhatsOnMubiBridge.php +++ /dev/null @@ -1,49 +0,0 @@ - [ - 'country' => [ - 'name' => 'Country', - 'type' => 'text', - 'exampleValue' => 'fr', - 'defaultValue' => 'fr', - ] - ] - ]; - - const XPATH_EXPRESSION_ITEM = '//div[@class="film"]'; - const XPATH_EXPRESSION_ITEM_TITLE = './/h2'; - const XPATH_EXPRESSION_ITEM_CONTENT = './/div[@class="film_details flex flex-col flex-1"]'; - const XPATH_EXPRESSION_ITEM_URI = './/a[@class="relative film_thumbnail"]/@href'; - const XPATH_EXPRESSION_ITEM_AUTHOR = './@data-directors'; - const XPATH_EXPRESSION_ITEM_TIMESTAMP = './/p[@class="hidden film-expires"]'; - const XPATH_EXPRESSION_ITEM_ENCLOSURES = './/a[@class="relative film_thumbnail"]/img/@src'; - const XPATH_EXPRESSION_ITEM_CATEGORIES = './/div[@class="film_details flex flex-col flex-1"]//div[@class="mt-3 flex flex-wrap"]'; - - public function getSourceUrl() { - return self::URI . '&showing=' . $this->getInput('country'); - } - - public function getIcon() { - return 'https://whatsonmubi.com/favicon.ico'; - } - - protected function formatItemTimestamp($value) { - return strtotime('today +' . $value); - } - - protected function formatItemContent($value) { - $text = preg_replace("/\s{2}\s+/", "\n", $value); - $lines = array_map("trim", explode("\n", $text)); - $title = $lines[0]; - $director = $lines[1]; - return $director . ' ' . $title; - } -} diff --git a/config/services/web/rss/default.nix b/config/services/web/rss/default.nix index c16327d..32d2a05 100644 --- a/config/services/web/rss/default.nix +++ b/config/services/web/rss/default.nix @@ -20,10 +20,6 @@ in { source = ./MaisonDeLaRadioBridge.php; } # Cinema - { - name = "WhatsOnMubi"; - source = ./WhatsOnMubiBridge.php; - } { name = "ParisCineInfo"; source = ./ParisCineInfoBridge.php; -- cgit v1.2.3