Skip to content

Commit

Permalink
docs: add an example on RSS feed
Browse files Browse the repository at this point in the history
closes #289.

[skip c]
  • Loading branch information
lilydjwg committed Feb 5, 2025
1 parent 4d5e29f commit dbf6c46
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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]'``.
Expand Down

0 comments on commit dbf6c46

Please sign in to comment.