Skip to content

Commit

Permalink
Fix download_edgar_data
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Oct 24, 2024
1 parent 3bdcdb0 commit cb613f5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions edgar/httprequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,11 +600,9 @@ async def download_bulk_data(data_url: str) -> Path:
if not download_path.exists():
download_path.mkdir()

as_text = data_url.endswith('.zip')

if filename.endswith(".zip"):
# Now stream the file to the data directory
await stream_file(data_url, as_text=as_text, path=download_path)
await stream_file(data_url, path=download_path)
# Unzip the file to the data directory / file
with zipfile.ZipFile(download_filename, 'r') as z:
z.extractall(download_path)
Expand Down

0 comments on commit cb613f5

Please sign in to comment.