dgunning / edgartools

Python library for working with SEC Edgar
MIT License
345 stars 74 forks source link

Downloading attachments of a filing #9

Closed georgebwang closed 1 year ago

georgebwang commented 1 year ago

Hello!

I really appreciate this Python package and thank you heaps to the authors and contributors of this package, you have made my life so much easier!

I hope it is okay for me to ask a question about the usage of the package. I am now in a situation that I would like to download only the attachments (i.e., not the primary document) of a filing. Would that be possible? Any suggestions would be appreciated.

Best regards, G

dgunning commented 1 year ago

You can probably do that now

This weekend I will release a new version with a simplified way to get an attachment

filing.attachments and filing.attachments[2]' andfiling.attachments[2].download()`

Depending on the filing type if you call also obj() on a filing and it will download the data file for that form and parse it into an object

filings = get_filing(form="13F-HR")
filing = filings[0]

Download and parse the holding report attachent
holding_report = filing.obj()
georgebwang commented 1 year ago

Thanks very much Dwight! Looking forward to the new version.

dgunning commented 1 year ago

Released 1.17.0 with filing.attachments filing.attachments[0] filing.attachments.download()