Chrome headless Manual mode rendering Web page

Source: Internet
Author: User

Can look at this inside the introduction, write very well. Https://duo.com/blog/driving-headless-chrome-with-python

from selenium import webdriver  from selenium.webdriver.chrome.options import Options`  chrome_options = Options()  chrome_options.add_argument("--headless")    ##需要加上,否则会弹出真实浏览器
chrome_options.binary_location =‘/opt/google/chrome/chrome
driver = webdriver.Chrome(executable_path="/home/yangdefeng/downloads/chromedriver")

准备条件是selenium3.4 ,py2或py3,chrome 59或60版本,chrome driver 2.30。看文章里面写的介绍是chrome金丝雀版本,但59版本以后有headless模式了。

The http://chromedriver.storage.googleapis.com/index.html,60 version of Chrome is available for download 2.30.



Chrome headless Manual mode rendering Web page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.