XML Decoding of Weather Underground Forecast feed?

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
Forum rules
This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
bschollnick2
Posts: 1355
Joined: Sun Oct 17, 2004 8:21 am
Location: Rochester, Ny
Contact:

XML Decoding of Weather Underground Forecast feed?

Post by bschollnick2 »

Anyone seen any good code in Python for the Weather Underground Forecast feed.

I have it partially working with ElementTree (etree), but I am running into issues due to duplicate XML tags...

- Ben
------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33
User avatar
Brandt
Posts: 414
Joined: Wed Dec 24, 2008 1:00 am
Location: Mission Viejo, CA

Re: XML Decoding of Weather Underground Forecast feed?

Post by Brandt »

I dunno about XML, but when I wrote a bash script to parse their data, i just grabbed their comma delimited flat files...
Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7
bschollnick2
Posts: 1355
Joined: Sun Oct 17, 2004 8:21 am
Location: Rochester, Ny
Contact:

Re: XML Decoding of Weather Underground Forecast feed?

Post by bschollnick2 »

pomprocker wrote:I dunno about XML, but when I wrote a bash script to parse their data, i just grabbed their comma delimited flat files...
Can you send me any information you have on that? I can use that for the forecast information.... But continue to use the XML for the rest...
------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: XML Decoding of Weather Underground Forecast feed?

Post by jay (support) »

bschollnick2 wrote:I have it partially working with ElementTree (etree), but I am running into issues due to duplicate XML tags...
I don't believe we have any problems with duplicate elements using minidom parsing the config files - perhaps you should switch. It's really not that hard once you get the hang of it.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
bschollnick2
Posts: 1355
Joined: Sun Oct 17, 2004 8:21 am
Location: Rochester, Ny
Contact:

Re: XML Decoding of Weather Underground Forecast feed?

Post by bschollnick2 »

jay wrote:
bschollnick2 wrote:I have it partially working with ElementTree (etree), but I am running into issues due to duplicate XML tags...
I don't believe we have any problems with duplicate elements using minidom parsing the config files - perhaps you should switch. It's really not that hard once you get the hang of it.
I think it's more of an issue of how I am remapping the XML into a dictionary... But some of that code is derived from the pywapi code... So I am not going to refactor it much, since I don't want to break NOAA, Yahoo, and Google Weather decoding...

I have it working now, so sometime within the next day or two, I'll be releasing the next beta....
------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33
Locked

Return to “Extending Indigo with Plugins and Python”