0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【備忘録】seleniumとchromedriver-binaryのインストール手順

Last updated at Posted at 2022-07-27
# vi /etc/yum.repos.d/google.chrome.repo

⇒下記を記入

==================================
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
==================================
# yum -y install google-chrome-stable
# google-chrome --version
⇒下記が表示されること(バージョンは差異あり)
Google Chrome 84.0.4147.125
# yum -y install ipa-gothic-fonts ipa-mincho-fonts ipa-pgothic-fon ts ipa-pmincho-fonts
# yum -y install python3
# pip3 install selenium
# pip3 install chromedriver-binary

おまけ
簡単なプログラム


from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--window-size=1280,1024')
options.add_argument("--no-sandbox")
driver = webdriver.Chrome('/usr/local/bin/chromedriver', chrome_options=options)
driver.get('https://www.yahoo.co.jp/')
driver.quit()

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?