Open artemk93 opened 9 years ago
In xbrl.py
inside function def parseGAAP()
liabilities = xbrl.find_all(name=re.compile("(us-gaap:liabilities$)", re.IGNORECASE | re.MULTILINE))
seems to solve the problem.
Same thing for assets or any other tag name
I've been working with the code, changing it slightly to look for values that I want to (I hope that is ok). If it helps I can post it here, I can also post the output that I get.
@artemk93 if you think the changes would be valuable to other people, go ahead a submit a PR with what you have and we can work on it. Thanks!
Thanks for the parser, @greedo greedo.
I am planning to follow in @artemk93's footsteps and make piecemeal changes but wanted to check if there was any update on you and @artemk93 work? It does not look like he/she ever actually submitted a PR
No progress on it yet @artemk93 and would gladly welcome your contributions.
I am using Arelle app to open xml files and double check the output from the code below
Output:
The problem is that every value is the first matching value in the xml file. So liabilities = 65285.0, is actually us-gaap:LiabilitiesCurrent, which comes before us-gaap:Liabilities. Same thing with assets = 3991.0 is actually us-gap:FiniteLivedIntangibleAssetsAccumulatedAmortization, which comes before us-gaap:Assets = 273 151 000 000.
I believe it can be solved by slightly changing part of
def parseGAAP()
in xbrl.py wherexbrl.find_all
is used for every value (assets, current_assets, etc)