BrelLibrary / brel

A Python library for reading XBRL reports
Other
22 stars 5 forks source link

No facts in filing #4

Closed bluezep closed 9 months ago

bluezep commented 10 months ago

Hi, Thanks for sharing all this work!

I am trying to parse Apple's 2023-09 10-Q.

The parser_result dictionary in brel_filing.py at init contains: 18,443 report elements 323 networks 700 components 0 facts 3 filing types

my directory, cacheDir, for the filing contains: aapl-20230930_def.xml" aapl-20230930_lab.xml" aapl-20230930_pre.xml" aapl-20230930.htm" aapl-20230930.xsd" aapl-20230930_cal.xml"

my code for processing: from brel import Filing, pprint cacheDir = ...... xbrlFiling = Filing.open(cacheDir) ans = xbrlFiling.get_facts_by_concept_name('us-gaap:PaymentsOfDividends)

ans is an empty list

Am I doing something wrong?

tia, Dick

PapediPoo commented 9 months ago

Hey there

Brel does not find any facts in your filing because it currently does not support .htm files, only .xml and .xsd files just add the following file to the directory and it should work. aapl htm xml file

The next release of Brel should support downloading via URI. So with the next version you can just call

brel.Filing.open("http://www.example.xbrl.report.xml")

and it will download everything automatically. No need to create any directory. But I haven't released this feature yet.