Fix SKYbrary feed, close #114
This commit is contained in:
parent
f9a5551f53
commit
d2eafe984e
3
itsb.xml
3
itsb.xml
|
@ -838,9 +838,10 @@
|
|||
<feed format="rss" lang="English" id="skybrary-rss">
|
||||
<curl>
|
||||
<url>https://skybrary.aero/accidents-map</url>
|
||||
<header name="User-Agent">Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36</header>
|
||||
</curl>
|
||||
<!-- Retrieve the GeoJSON features from within a <script> tag -->
|
||||
<shell><![CDATA[grep -o '"features":\[.*}\]}\]' | tail -c+12 | head -c-3]]></shell>
|
||||
<shell><![CDATA[grep -o '"features":\[.*}\]' | tail -c+12 | head -c-1]]></shell>
|
||||
<jq path="skybrary.jq" />
|
||||
<json2xml>
|
||||
<namespace prefix="georss">http://www.georss.org/georss</namespace>
|
||||
|
|
|
@ -22,11 +22,11 @@ import "./helpers" as helpers;
|
|||
"item": [
|
||||
.[]
|
||||
# Parse the HTML popup content to extract the link and description
|
||||
| .popup |= capture("^<a href=\"(?<link>[^\"]*)\">.*</a>(?<description>.*)$"; "m")
|
||||
| .popup |= capture("^<a href=\"(?<link>[^\"]*)\"[^>]*>.*</a>(?<description>.*)$"; "m")
|
||||
# Make the URL absolute
|
||||
| .popup.link |= helpers::urlresolve("https://skybrary.aero/accidents-map")
|
||||
| {
|
||||
"title": .label,
|
||||
"title": (.label | gsub("<[^>]*>"; "")),
|
||||
"link": .popup.link,
|
||||
"description": .popup.description,
|
||||
"guid": {
|
||||
|
|
Loading…
Reference in New Issue