summaryrefslogtreecommitdiff
path: root/config/services/web/rss
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2022-05-07 16:29:29 +0200
committerQuentin Aristote <quentin@aristote.fr>2022-05-07 16:29:29 +0200
commitffac7df79fffa4281d370b292c7f1bc9d7673d6d (patch)
treee1d6df72648972f1f1a3eb22dc43f488570aa8d8 /config/services/web/rss
parentff7bb74b99e47a5ae7c0eea124633640b1dde305 (diff)
rss-bridge: change parisjazzclub bridge content formatting
Diffstat (limited to 'config/services/web/rss')
-rw-r--r--config/services/web/rss/ParisJazzClubBridge.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/config/services/web/rss/ParisJazzClubBridge.php b/config/services/web/rss/ParisJazzClubBridge.php
index 02d6c31..d59c6cd 100644
--- a/config/services/web/rss/ParisJazzClubBridge.php
+++ b/config/services/web/rss/ParisJazzClubBridge.php
@@ -5,7 +5,7 @@ class ParisJazzClubBridge extends XPathAbstract {
const URI = 'https://www.parisjazzclub.net/en/agenda-free/';
const DESCRIPTION = 'Free concerts for the Paris Jazz Club subscribers.';
const MAINTAINER = 'Quentin Aristote';
- const CACHE_TIMEOUT = 86400; // 24h
+ const CACHE_TIMEOUT = 1; // 24h
const FEED_SOURCE_URL = 'https://www.parisjazzclub.net/en/agenda-free/';
const XPATH_EXPRESSION_ITEM = '//div[@class="col-12 mb-5 concerts-items"]';
@@ -28,6 +28,13 @@ class ParisJazzClubBridge extends XPathAbstract {
protected function formatItemContent($value) {
$text = preg_replace("/\s\s+/", "\n", $value);
- return $text;
+ $lines = array_map("trim", explode("\n", $text));
+ $time = $lines[0];
+ $title = $lines[1];
+ $club = $lines[2];
+ $location = $lines[3];
+ $category = $lines[4];
+ $date = $lines[5];
+ return $title . "," . $category . " -" . $club . "," . $location . " -" . $date . ", " . $time;
}
}