Fix ZMA feed, close #109
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
85005d6bf4
commit
37a99fd175
4
itsb.xml
4
itsb.xml
|
@ -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>
|
||||
|
|
11
jq/zma.jq
11
jq/zma.jq
|
@ -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"))
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user