添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Requests is a mature library, Python urllib is not even able to handle file downloads correctly because it will throw IncompleteRead error, I really don’t understand. Also, keep in mind that its creator already authorized Python to do it.

I would be interested in knowing the reason or why not add requests.

This bug is more than ten years old: How to handle IncompleteRead: in python - Stack Overflow

Franco M:

I understand, but I have to modify the entire code. Plus I have to import additional libraries.

If requests were added to the standard library, it would not change either of those things.

Franco M:

There is no way to continue the download?

requests is a pure-Python project , so we can be sure it is possible. (Okay, perhaps not: maybe that relies on one of its dependencies, which might have its own C code to do it - that takes a lot of work to check.) If you want to know how requests does it, the source code is there. Being more specific than that would require a fair bit of research or analysis - I don’t know if anyone else will want to attempt it for you.