Skip to content
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

Atom xml does not exist for a lot of countries (e.g. Germany) #1

Closed
kbaikov opened this issue May 18, 2019 · 7 comments
Closed

Atom xml does not exist for a lot of countries (e.g. Germany) #1

kbaikov opened this issue May 18, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@kbaikov
Copy link

kbaikov commented May 18, 2019

Tried to use the Meteoalert, but got a WrongCountry exception for Germany/Berlin.
It looks like the ATOM links you are using do not exist for a lot of countries.

Perhaps a better idea is to use rss?
For example: http://www.meteoalarm.eu/documents/rss/de/DE202.rss is for Berlin.

@rolfberkenbosch
Copy link
Owner

It seems that meteoalarm has a fault on its website. In the root.xml (http://www.meteoalarm.eu/ATOM/root.xml) there are all countries defined but the links are for some countries broken, for example Germany. I will look if it is possible to use for those countries rss instead of xml. There is one downside of that, i cannot split the description field because it is not standardized by meteoalarm.

@mmnewmedia
Copy link

there is no solution till now to use the meteoalertapi script (Python) for fetching data from Germany... any suggestions?

@mmnewmedia
Copy link

would be nice to have a solution for getting data from germany. with meteoalert I always get errors:
Traceback (most recent call last): File "meteoalert.py", line 9, in <module> print(str(meteo.get_alert())) File "/home/larimadora/.local/lib/python3.8/site-packages/meteoalertapi/meteoalertapi.py", line 34, in get_alert feed_data = xmltodict.parse(text) File "/home/larimadora/.local/lib/python3.8/site-packages/xmltodict.py", line 327, in parse parser.Parse(xml_input, True) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 28, column 71
can you help?

@rolfberkenbosch
Copy link
Owner

I saw some scripts that are able to parse the rss feed. I will look into that and try to add that also to this python script. My goal is to make as user friendly as i can.

@mmnewmedia
Copy link

let me know when you add it! would be very happy about that!

@roaldnefs
Copy link
Collaborator

Please let me know if you need any help on this issue @rolfberkenbosch, I would be happy to help if needed!

@roaldnefs roaldnefs added the bug Something isn't working label Feb 10, 2021
@rolfberkenbosch
Copy link
Owner

Sorry for my late response. Meteoalarm has finally update their api. All countries support now the atom feed. That means that you can use germany now also. We have to wait when my pull request is merged in home-assistant. I think in the next release next month. For details check: home-assistant/core#51383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants