Add GUIDs and fix date handling on ATSB

This commit is contained in:
Lucidiot 2021-02-22 21:12:40 +01:00
parent c6437afc86
commit 1022b7b2da
Signed by: lucidiot
GPG Key ID: 3358C1CA6906FB8D
1 changed files with 7 additions and 1 deletions

View File

@ -19,7 +19,13 @@ import "./helpers" as helpers;
"title": .children[0].children[0].text,
"description": .children[1].text,
"link": (.children[0].children[0].href|helpers::urlresolve("https://www.atsb.gov.au")),
"pubDate": (try (.children[4].text | strptime("%d %b %Y") | mktime | strftime("%a, %d %b %Y %T %z")))
"guid": (.children[0].children[0].href|helpers::urlresolve("https://www.atsb.gov.au")),
"pubDate": (
if .children[4].text == "N/A" then .children[2].text else .children[4].text end
| strptime("%d %b %Y")
| mktime
| strftime("%a, %d %b %Y %T %z")
)
}]
}
}