What is the difference between using BeautifulSoup and Geckodriver on selenium?

吃可爱长大的小学妹 提交于 2021-02-10 12:56:14

问题


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.

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


回答1:


BeautifulSoup is designed for web scraping.

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 is a driver for Firefox, often for the purpose of testing in Selenium.

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.

Selenium is often used to:

  1. create robust, browser-based regression automation suites and tests
  2. scale and distribute scripts across many environments

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.




回答2:


I am just throwing more light on GeckoDriver

The implementation of Firefox Driver has been changed in Selenium 3.0. Starting with Firefox version 47.0+, we need to use separate a driver that will interact with the Firefox browser similarly to ChromeDriver. The new driver for Firefox is called Geckodriver.

The Geckodriver provides the HTTP API described by the W3C WebDriver Protocol to communicate with Gecko browsers, such as Firefox. It translates calls into the Firefox Remote Protocol (Marionette) by acting as a proxy between the local and remote ends.

Geckodriver releases can be tracked here



来源:https://stackoverflow.com/questions/51991181/what-is-the-difference-between-using-beautifulsoup-and-geckodriver-on-selenium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!