Closed chaosAD closed 4 years ago
Hi, it must have something wrong. When I run the new script, all files are corrupt and about ~10k in size. Thanks.
My apologies, the code was using an uninitialized url
variable (a symptom of cut-and-paste from my test code). I have fixed it.
Merged, thanks!
The original code keeps the download content in the memory before writing to the file. If the file is very large, then it will cause memory error in the
requests.get()
. I fixed it by using streaming mode, thus it resolves #33.I added
requirements2x.txt
for python 2.7.x users. I know I should be upgrading to Python 3 ;-)I also fixed filename-too-long issue by truncating it. Some files have names longer than 150 characters, thus generating
IOError
. It happens under Python 2.7.x. I am not sure if Python 3 has the same issue or not.