Fix ZMA feed, close #109
continuous-integration/drone/push Build is passing Details

This commit is contained in:
~lucidiot 2022-08-29 06:41:30 +02:00
parent 85005d6bf4
commit 37a99fd175
Signed by: lucidiot
GPG Key ID: 3358C1CA6906FB8D
2 changed files with 8 additions and 7 deletions

View File

@ -896,9 +896,9 @@
<url>https://www.zma.go.tz/</url>
<feed format="rss" lang="English" id="zma-rss">
<curl>
<url>https://www.zma.go.tz/zma_casuality.php</url>
<url>https://www.zma.go.tz/ZMA_Accidents.html</url>
</curl>
<pup>#content2 li a</pup>
<pup>div[class$="-event"]</pup>
<jq path="zma.jq" />
<json2xml />
<output>zma.xml</output>

View File

@ -9,18 +9,19 @@ import "./helpers" as helpers;
"channel": {
"title": "ZMA investigation reports",
"description": "Zanzibar Maritime Authority accident investigation reports",
"link": "https://www.zma.go.tz/zma_casuality.php",
"link": "https://www.zma.go.tz/ZMA_Accidents.html",
"language": "en-tz",
"pubDate": (now | strftime("%a, %d %b %Y %T %z")),
"docs": "https://www.rssboard.org/rss-specification",
"ttl": 1440,
"generator": "ITSB",
"item": [.[] | {
"title": .text,
"link": (.href | helpers::urlresolve("https://www.zma.go.tz/zma_casuality.php")),
"item": [.[].children | select(.[0].children[1].href != "#") | {
"title": .[1].text,
"link": (.[0].children[1].href | helpers::urlresolve("https://www.zma.go.tz/ZMA_Accidents.html")),
"description": .[2].text,
"guid": {
"@isPermaLink": "true",
"#text": (.href | helpers::urlresolve("https://www.zma.go.tz/zma_casuality.php"))
"#text": (.[0].children[1].href | helpers::urlresolve("https://www.zma.go.tz/ZMA_Accidents.html"))
}
}]
}