Fix AAC custom feed
This commit is contained in:
parent
7ebbf262c1
commit
d27c35d664
2
itsb.xml
2
itsb.xml
|
@ -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" />
|
||||
|
|
13
jq/aac.jq
13
jq/aac.jq
|
@ -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("'(.*)'").captures[0].string
|
||||
# & is escaped as we were within an HTML attribute, so this restores it
|
||||
| sub("&"; "&")
|
||||
),
|
||||
"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"))
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue