-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XML Parsed Error #261
Comments
Here is an example URL, which is JSON (so not either XML or HTML): https://www.metservice.com/publicData/webdata/warnings-service/urban/auckland
|
Same here, and same issues as #220 There should be a way to filter out this specific warning. Or maybe reduce the criticality to WARN or INFO so that it can be filtered by native log support? https://community.home-assistant.io/t/how-to-exclude-a-specific-warning-from-log/38761/13?u=diamant-x Thanks. |
Is there any solution for this? |
I just use this in the logger: `logger: filters:
` |
Wonderful, will try, thanks! |
Nice workaround! |
I did not, i just looked at the logs and copy the first words of the notification i do not want to see anymore. Maybe just only
|
Use the IP of your own printer.. OR Just start using my instant_ink_print_plan yaml https://github.com/Ricks88/HASS_HPInstantInk/tree/main No more need of ping sensor and multiscrape or any XML errors. |
@Ricks88 I tried the log filter but I still get the log entries. My entry looks like this.
Is there something wrong in the formating? |
Yes, sorry! Correct config:
|
@Ricks88 Thx that worked |
I reproduced this issue and setting the parser to |
Just tried it and the error is still there. Do I have to change the parser option, too. Mine is set to lxml. |
Try setting it to 'xml' and let me know pls |
When I do that I get
This is my configuration
and here is the xml data from the inverter
|
@stephan1827 So I tried to reproduce your scenario. I set up a local web server serving your xml. Then I use your configuration to scrape it. Indeed it doesn't work with |
Yep, its still there
|
Hello,
Not sure if this is a Issue/bug, but I am getting this new error:
Deze fout is ontstaan door een aangepaste integratie.
Logger: py.warnings
Source: custom_components/multiscrape/scraper.py:59
Integration: Multiscrape scraping component (documentation, issues)
First occurred: 16:25:02 (2 occurrences)
Last logged: 16:26:07
/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(My code is:
`multiscrape:
resource: "https://hp-officejet.local/DevMgmt/ProductUsageDyn.xml"
parser: "lxml"
scan_interval: 60
verify_ssl: false
sensor:
name: "HP OfficeJet 8022 Total Pages Printed"
select: 'dd:TotalImpressions[PEID="5082"]'
value_template: >-
{% if value == "" %}
0
{% else %}
{{ value }}
{% endif %}`
I only have used BS4 as Package into AppDeamon, I dont understand why it is using BS4 in the multiscrape or how to use XML parser instead.
The text was updated successfully, but these errors were encountered: