XPath 1.0 is a standard query language for advanced users, and which FreshRSS supports to enable Web scraping.
Example: //title or a static string: "My custom feed"
//title
"My custom feed"
Example: //div[@class="news-item"]
//div[@class="news-item"]
Use in particular the XPath axis descendant:: like descendant::h2
descendant::
descendant::h2
Example to take the full item: .
.
Example: descendant::a/@href
descendant::a/@href
Example: descendant::img/@src
descendant::img/@src
Can also be a static string. Example: "Anonymous"
"Anonymous"
The result will be parsed by strtotime()
strtotime()
Optional. A format supported by DateTime::createFromFormat() such as d-m-Y H:i:s
DateTime::createFromFormat()
d-m-Y H:i:s
Example: normalize-space(//script[@type="application/json"]) (single JSON)or: //script[@type="application/ld+json"] (one JSON object per article)
normalize-space(//script[@type="application/json"])
//script[@type="application/ld+json"]
A JSON dot notated uses dots between objects and brackets for arrays (e.g. data.items[0].title)
data.items[0].title
Example: meta.title or a static string: "My custom feed"
meta.title
JSON path to the array containing the items, e.g. $ or newsItems
$
newsItems
Key under which the content is found, e.g. content
content
Example: permalink
permalink
Example: image
image
Example: foo=bar; gdpr_consent=true; cookie=value
Allow the feed server to set cookies (stored in memory for the duration of the request only)
Set to 0 or leave blank to disable, -1 for unlimited redirects
Example: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0)
Select a protocol (e.g: SOCKS5) and enter the proxy address (e.g: 127.0.0.1:1080 or username:password@127.0.0.1:1080)
The POST payload has automatic support for application/x-www-form-urlencoded and application/json
application/x-www-form-urlencoded
application/json
Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: Accept: application/atom+xmlAuthorization: Bearer some-token).
Accept: application/atom+xmlAuthorization: Bearer some-token
Provide the URL to an OPML file to dynamically populate this category with feeds