1 # get noaa data 2 gaugeID = row.getValue('GuageID') 3 if gaugeID: 4 ndata = minidom.parse(urllib2.urlopen('http://water.weather.gov/ahps2/rss/fcst/' + gaugeID.lower() + '.rss')) 5 descriptionText = ndata.getElementsByTagName('description')[2].firstChild.nodeValue 6 descriptionList = descriptionText.split('<br />') 7 row.setValue('HIGHEST_FORECAST', descriptionList[5].split()[2].strip()) 8 row.setValue('HIGHEST_FORECAST_DATE', getNOAADate(descriptionList[6].split('Time:')[1].strip())) 9 row.setValue('LAST_FORECAST', descriptionList[8].split()[2].strip()) 10 row.setValue('LAST_FORECAST_DATE', getNOAADate(descriptionList[9].split('Time:')[1].strip()))