python爬虫环境配置

2018-10-11  本文已影响0人  Hf1dw

0x01 requests

0x02 selenium

chrome:https://chromedriver.storage.googleapis.com/index.html
Edge:https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver) 
Firefox:https://github.com/mozilla/geckodriver/releases
Safari:https://webkit.org/blog/6900/webdriver-support-in-safari-10/

其他常用的库:

lxml 只会局部遍历,而Beautiful Soup 是基于HTML DOM的,会载入整个文档,解析整个DOM树,因此时间和内存开销都会大很多,所以性能要低于lxml。
BeautifulSoup 用来解析 HTML 比较简单,API非常人性化,支持CSS选择器、Python标准库中的HTML解析器、lxml 的 XML解析器。
上一篇 下一篇

猜你喜欢

热点阅读