python-xbrl icon indicating copy to clipboard operation
python-xbrl copied to clipboard

Sample run returns 0 on all data

Open jasonmellone opened this issue 7 years ago • 0 comments


# 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


jasonmellone avatar Mar 15 '17 13:03 jasonmellone