What are the differences between the urllib, urllib2, urllib3 and requests module?

后端 未结 11 2309
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 04:19

In Python, what are the differences between the urllib, urllib2, urllib3 and requests modules? Why are there three? They seem to do the same thing...

11条回答
  •  遥遥无期
    2020-11-22 04:57

    A key point that I find missing in the above answers is that urllib returns an object of type whereas requests returns .

    Due to this, read() method can be used with urllib but not with requests.

    P.S. : requests is already rich with so many methods that it hardly needs one more as read() ;>

提交回复
热议问题