Python 3 网页抓取选项 [英] Python 3 web scraping options

查看:43
本文介绍了Python 3 网页抓取选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Python 新手,所以如果这是一个新手问题,我很抱歉.

I'm new to Python so I'm sorry if this is a newbie question.

我正在尝试构建一个涉及网页抓取的程序,我注意到 Python 3 的网页抓取模块似乎比 Python 2.x 系列少得多.

I'm trying to build a program involving webscraping and I've noticed that Python 3 seems to have significantly fewer web-scraping modules than the Python 2.x series.

Beautiful Soup、mechanize 和scrapy——推荐给我的三个模块——似乎都不兼容.

Beautiful Soup, mechanize, and scrapy -- the three modules recommended to me -- all seem to be incompatible.

我想知道这个论坛上是否有人有使用 python 3 进行网页抓取的好选择.

I'm wondering if anyone on this forum has a good option for webscraping using python 3.

任何建议将不胜感激.

谢谢,将

推荐答案

lxml.html 适用于 Python 3,至少可以让您进行 html 解析.

lxml.html works on Python 3, and gets you html parsing, at least.

正在开发中的 BeautifulSoup 4 应该支持 Python 3(我已经在这方面做了一些工作).

BeautifulSoup 4, which is in the works, should support Python 3 (I've done some work on this).

这篇关于Python 3 网页抓取选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆