Which is best in Python: urllib2, PycURL or mechanize?

前端 未结 8 1317
一个人的身影
一个人的身影 2021-01-29 17:48

Ok so I need to download some web pages using Python and did a quick investigation of my options.

Included with Python:

urllib - seems to me that I should use ur

8条回答
  •  一向
    一向 (楼主)
    2021-01-29 17:51

    Take a look on Grab (http://grablib.org). It is a network library which provides two main interfaces: 1) Grab for creating network requests and parsing retrieved data 2) Spider for creating bulk site scrapers

    Under the hood Grab uses pycurl and lxml but it is possible to use other network transports (for example, requests library). Requests transport is not well tested yet.

提交回复
热议问题