Take a look at your code:
document = ('http://www.newyorkfed.org/markets/omo/dmm/fftoXML.cfm?type=daily''r') web = urllib.urlopen(document) get_web = web.read() xmldoc = minidom.parseString(document)
I'm not sure if you have the correct document if you do not want http://www.newyorkfed.org/markets/omo/dmm/fftoXML.cfm?type=dailyr because what you get (a group of guys in in this case, the lines listed next to each other are automatically combined).
After that, you will do some work on creating get_web, but then you will not use it on the next line. Instead, you are trying to parse your document , which is the url ...
In addition, I would completely suggest you use ElementTree, preferably lxml ElementTree ( http://lxml.de/ ). In addition, lxml etree parser accepts a file-like object, which may be a urllib object. If you did this by straightening the rest of your document, you could do this:
from lxml import etree from io import StringIO import urllib url = 'http://www.newyorkfed.org/markets/omo/dmm/fftoXML.cfm?type=daily' root = etree.parse(urllib.urlopen(url)) for obs in root.xpath('/ff:DataSet/ff:Series/ff:Obs'): price = obs.xpath('./base:OBS_VALUE').text print(price)
underrun
source share