The logs trows me a strange error:
/usr/local/lib/python3.11/site-packages/bs4/builder/__init__.py:545: XMLParsedAsHTMLWarning: It looks like you're parsing an XML document using an HTML parser. If this really is an HTML document (maybe it's XHTML?), you can ignore or filter this warning. If it's XML, you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the lxml package installed, and pass the keyword argument `features="xml"` into the BeautifulSoup constructor. warnings.warn(
The code:
multiscrape:
- name: "HP Printer Scraper"
resource: "https://hp-officejet.local/DevMgmt/ProductUsageDyn.xml"
scan_interval: 60
verify_ssl: false
sensor:
- unique_id: hp_officejet_8022_total_pages_printed
name: "HP OfficeJet 8022 Total Pages Printed"
select: 'dd\:TotalImpressions[PEID="5082"]'
value_template: >-
{% if value == "" %}
0
{% else %}
{{ value }}
{% endif %}
The thing is that I only have BS4 packages in AppDeamon, I don’t understand why the Multiscrape uses it here and how to parse it to uses XML?