I have to develop a program that downloads an excel file from a website in manageable chunks. Each component can only be 10MB in size, and the file extension is (.xls).
I can write various pieces of a specific size, but the characters make them worthless. I tried changing the encoding, but that didn't help either.
A code sample:
with open(file, 'wb') as f:
        for part in requests.get(website_link, stream=True).iter_content(chunk_size=10000):
             f.write(chunk)
             actual_size += 10000
             if actual_size + 10000 >= maximum_chunk_size:
                break