在硒上使用BeautifulSoup和Geckodriver有什么区别? [英] What is the difference between using BeautifulSoup and Geckodriver on selenium?

查看:62
本文介绍了在硒上使用BeautifulSoup和Geckodriver有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前对使用硒3的美丽汤和geckodriver还是陌生的.我正在一个项目中,我必须从网页中抓取URL.

I'm currently new to both beautiful soup and geckodriver working on selenium 3. I am working on a project where I have to scrape URL from web pages.

我发现它们两者都用于网页抓取,但无法获得两者之间的区别.BeautifulSoup和Geckodriver有什么区别?感谢您的帮助.

I found that both of them are used for web scraping, but could not get the difference between the two of them. What is the difference between BeautifulSoup and Geckodriver? Thanks for the help.

推荐答案

BeautifulSoup 设计用于Web抓取.

BeautifulSoup is designed for web scraping.

一个Python库,用于从HTML和XML文件中提取数据.有用与您最喜欢的解析器一起提供惯用的导航方式,搜索和修改分析树.它通常可以节省程序员几小时或几天的工作.

a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves programmers hours or days of work.

Geckodriver 是Firefox的驱动程序,通常用于在Selenium中进行测试.

Geckodriver is a driver for Firefox, often for the purpose of testing in Selenium.

该程序提供了WebDriver协议描述的HTTP API与Gecko浏览器(例如Firefox)进行通信.它翻译通过充当Firefox之间的代理来调用Firefox远程协议本地端和远程端.

This program provides the HTTP API described by the WebDriver protocol to communicate with Gecko browsers, such as Firefox. It translates calls into the Firefox remote protocol by acting as a proxy between the local- and remote ends.

通常用于:

  1. 创建强大的,基于浏览器的回归自动化套件和测试
  2. 在许多环境中扩展和分发脚本

Selenium使浏览器自动化.就是这样!您使用这种功能所要做的就是完全取决于您.主要是用于自动化Web应用程序出于测试目的,但当然不仅限于此.基于Web的无聊管理任务可以(并且应该!)自动化也是

Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) be automated as well.

这篇关于在硒上使用BeautifulSoup和Geckodriver有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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