greedo / python-xbrl

xbrl parser written in Python :bulb:
https://pypi.python.org/pypi/python-xbrl
Apache License 2.0
220 stars 76 forks source link

Sample run returns 0 on all data #42

Open jasonmellone opened 7 years ago

jasonmellone commented 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