XML Decoding of Weather Underground Forecast feed?

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

Posted on
Sun Jun 05, 2011 8:01 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

XML Decoding of Weather Underground Forecast feed?

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

Posted on
Mon Jun 06, 2011 3:31 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: XML Decoding of Weather Underground Forecast feed?

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

Posted on
Mon Jun 06, 2011 5:29 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: XML Decoding of Weather Underground Forecast feed?

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

Posted on
Mon Jun 06, 2011 5:43 pm
jay (support) offline
Site Admin
User avatar
Posts: 18247
Joined: Mar 19, 2008
Location: Austin, Texas

Re: XML Decoding of Weather Underground Forecast feed?

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

Posted on
Tue Jun 07, 2011 7:44 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: XML Decoding of Weather Underground Forecast feed?

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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests