Open jasonmellone opened 7 years ago
# coding: utf-8 # In[1]: from xbrl import XBRLParser, GAAP, GAAPSerializer response = urllib2.urlopen("https://www.sec.gov/Archives/edgar/data/909832/000090983216000032/cost-20160828.xml") html = response.read() with open("xbrl.xml","w") as f: f.write(html) # In[9]: xbrl_parser = XBRLParser() xbrl = xbrl_parser.parse(file("xbrl.xml")) # In[13]: gaap_obj=xbrl_parser.parseGAAP(xbrl) gaap_obj.revenues #returns 0