Closed peiyaoli closed 5 months ago
Do you have the accession number for the filing you are trying to download, so I can reproduce?
The submission file is text not binary and so open("my_file.txt", "w")
should work
Or download as string then .encode('utf-8')
to convert to binary
Other ways
from path lib import Path
Path('file.txt').write_bytes(filing.full_text_submission().encode('utf-8'))
To download an image file
Path('image.jpg').write_bytes(filing.attachments[2].download())
Please check if that solution works for you
Closing this issue.
Really appreciate you have created such an awesome library.
Here is one issue we came up with:
After I fetched attachment![Screenshot 2024-01-24 100034](https://github.com/dgunning/edgartools/assets/18466185/469c89a2-bd85-4112-8df1-b2796a3147a2)
I need to download last text file, here is my code:
It showed error, can I resolve this issue?