Fix AAC custom feed

This commit is contained in:
Lucidiot 2022-01-01 03:26:51 +01:00
parent 7ebbf262c1
commit d27c35d664
Signed by: lucidiot
GPG Key ID: 3358C1CA6906FB8D
2 changed files with 4 additions and 11 deletions

View File

@ -1186,7 +1186,7 @@
<frequency>0-2 reports/year</frequency>
<feed type="aviation" lang="Spanish" format="rss" id="aac-rss">
<curl>
<url>https://www.aac.gob.sv/?page_id=1006</url>
<url>https://www.aac.gob.sv/informes-de-accidentes/</url>
</curl>
<pup>tr:not(:first-child)</pup>
<jq path="aac.jq" />

View File

@ -17,16 +17,9 @@
"item": [
.[].children | {
"title": .[0].children[0].text,
"link": (
# The links are held in onclick attributes which set location.href to a string,
# so we extract the string.
.[3].children[0].onclick
| match("&#39;(.*)&#39;").captures[0].string
# & is escaped as we were within an HTML attribute, so this restores it
| sub("&amp;"; "&")
),
"description": .[1].children[0].text,
"pubDate": (.[2].text | strptime("%d/%m/%Y") | mktime | strftime("%a, %d %b %Y %T %z"))
"link": .[2].children[2].children[0].children[0].children[0].src,
"description": .[0].children[3].text,
"pubDate": (.[1]["data-order"] | tonumber | gmtime | mktime | strftime("%a, %d %b %Y %T %z"))
}
]
}