Raspberry pi3에서 selenium을 사용하기 위해 Chromium, Chromedriver 등에 설치
6469 단어 RaspberryPi파이썬셀레늄
My Pi3
🐨$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
🐨$ uname -a
Linux raspberrypi 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux
중요한 것
chromedriver
, chromium-browser
, chromium-codecs-ffmpeg-extra
, chromium-chromedriver
버전 맞추기.
디폴트로 들어 있는 Chromium의 버젼은 86.XXX.XX...
계였지만, 주워 이것이 되는 driver가 87.XXX.XX...
이었기 때문에 화났다.
했던 일
🐨$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
🐨$ uname -a
Linux raspberrypi 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux
chromedriver
, chromium-browser
, chromium-codecs-ffmpeg-extra
, chromium-chromedriver
버전 맞추기.디폴트로 들어 있는 Chromium의 버젼은
86.XXX.XX...
계였지만, 주워 이것이 되는 driver가 87.XXX.XX...
이었기 때문에 화났다.했던 일
chromedriver
의 install chromium-browser
업데이트chromium-codecs-ffmpeg-extra
update chromium-chromedriver
의 install 실행
사용할 파일 다운로드
$ wget http://launchpadlibrarian.net/508931216/chromium-browser_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
$ wget http://launchpadlibrarian.net/508931218/chromium-codecs-ffmpeg-extra_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
$ wget http://launchpadlibrarian.net/507792522/chromium-chromedriver_87.0.4280.66-0ubuntu0.16.04.1_armhf.deb
$ ls
chromium-browser_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
chromium-chromedriver_87.0.4280.88-0ubuntu0.18.04.1_armhf.deb
chromium-codecs-ffmpeg-extra_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
설치
$ sudo dpkg -i chromium-codecs-ffmpeg-extra_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
(Reading database ... 99100 files and directories currently installed.)
Preparing to unpack chromium-codecs-ffmpeg-extra_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb ...
Unpacking chromium-codecs-ffmpeg-extra (87.0.4280.66-0ubuntu0.18.04.1) over (86.0.4240.197-rpt1) ...
Setting up chromium-codecs-ffmpeg-extra (87.0.4280.66-0ubuntu0.18.04.1) ...
$ sudo dpkg -i chromium-browser_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
(Reading database ... 99097 files and directories currently installed.)
Preparing to unpack chromium-browser_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb ...
Unpacking chromium-browser (87.0.4280.66-0ubuntu0.18.04.1) over (87.0.4280.66-0ubuntu0.18.04.1) ...
Setting up chromium-browser (87.0.4280.66-0ubuntu0.18.04.1) ...
update-alternatives: using /usr/bin/dillo to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.8.5-2) ...
$ sudo dpkg -i chromium-chromedriver_87.0.4280.88-0ubuntu0.18.04.1_armhf.deb
Selecting previously unselected package chromium-chromedriver.
(Reading database ... 99097 files and directories currently installed.)
Preparing to unpack chromium-chromedriver_87.0.4280.88-0ubuntu0.18.04.1_armhf.deb ...
Unpacking chromium-chromedriver (87.0.4280.88-0ubuntu0.18.04.1) ...
Setting up chromium-chromedriver (87.0.4280.88-0ubuntu0.18.04.1) ...
확인
$ chromedriver --version
ChromeDriver 87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761})
$ chromium-browser --version
Chromium 87.0.4280.66 Built on Ubuntu , running on Raspbian 10
Selenium이 움직이거나 시도
pip install selenium
from selenium import webdriver
chrome_option = webdriver.ChromeOptions()
chrome_option.add_argument('--headless')
driver = webdriver.Chrome(options=chrome_option)
driver.get("https://profile.yoshimoto.co.jp/talent/detail?id=6504")
driver.save_screenshot('screeeeeeeeeeenshot.png')
driver.quit()
호이
참고
$ wget http://launchpadlibrarian.net/508931216/chromium-browser_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
$ wget http://launchpadlibrarian.net/508931218/chromium-codecs-ffmpeg-extra_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
$ wget http://launchpadlibrarian.net/507792522/chromium-chromedriver_87.0.4280.66-0ubuntu0.16.04.1_armhf.deb
$ ls
chromium-browser_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
chromium-chromedriver_87.0.4280.88-0ubuntu0.18.04.1_armhf.deb
chromium-codecs-ffmpeg-extra_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
$ sudo dpkg -i chromium-codecs-ffmpeg-extra_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
(Reading database ... 99100 files and directories currently installed.)
Preparing to unpack chromium-codecs-ffmpeg-extra_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb ...
Unpacking chromium-codecs-ffmpeg-extra (87.0.4280.66-0ubuntu0.18.04.1) over (86.0.4240.197-rpt1) ...
Setting up chromium-codecs-ffmpeg-extra (87.0.4280.66-0ubuntu0.18.04.1) ...
$ sudo dpkg -i chromium-browser_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb
(Reading database ... 99097 files and directories currently installed.)
Preparing to unpack chromium-browser_87.0.4280.66-0ubuntu0.18.04.1_armhf.deb ...
Unpacking chromium-browser (87.0.4280.66-0ubuntu0.18.04.1) over (87.0.4280.66-0ubuntu0.18.04.1) ...
Setting up chromium-browser (87.0.4280.66-0ubuntu0.18.04.1) ...
update-alternatives: using /usr/bin/dillo to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.8.5-2) ...
$ sudo dpkg -i chromium-chromedriver_87.0.4280.88-0ubuntu0.18.04.1_armhf.deb
Selecting previously unselected package chromium-chromedriver.
(Reading database ... 99097 files and directories currently installed.)
Preparing to unpack chromium-chromedriver_87.0.4280.88-0ubuntu0.18.04.1_armhf.deb ...
Unpacking chromium-chromedriver (87.0.4280.88-0ubuntu0.18.04.1) ...
Setting up chromium-chromedriver (87.0.4280.88-0ubuntu0.18.04.1) ...
$ chromedriver --version
ChromeDriver 87.0.4280.88 (89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280@{#1761})
$ chromium-browser --version
Chromium 87.0.4280.66 Built on Ubuntu , running on Raspbian 10
pip install selenium
from selenium import webdriver
chrome_option = webdriver.ChromeOptions()
chrome_option.add_argument('--headless')
driver = webdriver.Chrome(options=chrome_option)
driver.get("https://profile.yoshimoto.co.jp/talent/detail?id=6504")
driver.save_screenshot('screeeeeeeeeeenshot.png')
driver.quit()
호이
참고
Reference
이 문제에 관하여(Raspberry pi3에서 selenium을 사용하기 위해 Chromium, Chromedriver 등에 설치), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/241824182418/items/1d7b8615cfdc9a7bb27f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)