From dbf6c4601fc19f54a72a239aa56781fb39af05b5 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Wed, 5 Feb 2025 14:57:56 +0800 Subject: [PATCH] docs: add an example on RSS feed closes #289. [skip c] --- docs/usage.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/usage.rst b/docs/usage.rst index 7c6671f..ad182d1 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -322,6 +322,18 @@ post_data post_data_type (*Optional*) Specifies the ``Content-Type`` of the request body (``post_data``). By default, this is ``application/x-www-form-urlencoded``. +This source can also work with XML to some extent, e.g. it can parse an RSS feed like this: + +.. code-block:: toml + + [ProxmoxVE] + source = "htmlparser" + url = "https://my.proxmox.com/en/announcements/tag/proxmox-ve/rss" + is_xml = true + xpath = "//item/title" + from_pattern = 'Proxmox VE ([\d.]+) released!' + to_pattern = '\1' + .. note:: An additional dependency "lxml" is required. You can use ``pip install 'nvchecker[htmlparser]'``.