【发布时间】:2017-05-06 12:18:18
【问题描述】:
我尝试在 Python 中使用 Beautifulsoup 解析 50 000 个 url。 解析循环工作:
我发现解析一页的时间是 15 - 18 秒。从页面我抓取了大约 20 个元素。
Beautifulsoup 为什么运行这么慢?如何在 Python 中加速 Beautifulsoup?
【问题讨论】:
-
使用lxml库或者使用beautiful的lxml解析器
标签: python python-2.7 beautifulsoup