python:selenium

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
python:selenium [2022/05/31 05:00] – [動作確認] ともやんpython:selenium [2022/06/01 04:35] (現在) – [DietPi の chromium-driver] ともやん
行 9: 行 9:
  
 ===== ChromeDriver のインストール ===== ===== ChromeDriver のインストール =====
 +本家: [[https://chromedriver.chromium.org|ChromeDriver - WebDriver for Chrome]]\\
  
 ==== Fedora ==== ==== Fedora ====
行 201: 行 202:
  
 ==== DietPi ==== ==== DietPi ====
 +
 +=== DietPi で chromedriver を含むパッケージ ===
 +<WRAP color_term>
 +<WRAP color_command><code>
 +$ apt-file search chromedriver
 +</code></WRAP>
 +<WRAP color_result><code>
 +chromium-browser: /usr/lib/chromium-browser/chromedriver.debug
 +chromium-browser: /usr/lib/chromium-browser/chromedriver.unstripped
 +chromium-chromedriver: /usr/bin/chromedriver
 +chromium-chromedriver: /usr/lib/chromium-browser/chromedriver
 +chromium-chromedriver: /usr/share/doc/chromium-chromedriver/changelog.Debian.gz
 +chromium-chromedriver: /usr/share/doc/chromium-chromedriver/copyright
 +chromium-chromedriver-dbgsym: /usr/share/doc/chromium-chromedriver-dbgsym
 +chromium-driver: /usr/bin/chromedriver
 +ruby-chromedriver-helper: /usr/share/doc/ruby-chromedriver-helper/README.md.gz
 +ruby-chromedriver-helper: /usr/share/doc/ruby-chromedriver-helper/changelog.Debian.gz
 +ruby-chromedriver-helper: /usr/share/doc/ruby-chromedriver-helper/changelog.gz
 +ruby-chromedriver-helper: /usr/share/doc/ruby-chromedriver-helper/copyright
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/bin/chromedriver-helper
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/bin/chromedriver-update
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/concourse/chromedriver-helper.yml
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/concourse/tasks/rake-test/run.ps1
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/concourse/tasks/rake-test/run.sh
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/lib/chromedriver-helper.rb
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/lib/chromedriver/helper.rb
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/lib/chromedriver/helper/google_code_parser.rb
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/gems/chromedriver-helper-2.1.0/lib/chromedriver/helper/version.rb
 +ruby-chromedriver-helper: /usr/share/rubygems-integration/all/specifications/chromedriver-helper-2.1.0.gemspec
 +wolfram-engine: /opt/Wolfram/WolframEngine/13.0/SystemFiles/Components/WebUnit/Resources/DriverBinaries/ChromeDriver/Linux-ARM/chromedriver
 +</code></WRAP>
 +</WRAP>
 +
 +=== DietPi の chromium-browser の chromium-chromedriver は動作する🤔ややこしい😅💦 ===
 +<WRAP color_term>
 +<WRAP color_command><code>
 +$ sudo apt install chromium-chromedriver
 +</code></WRAP>
 +<WRAP color_result><code>
 +Reading package lists... Done
 +Building dependency tree... Done
 +Reading state information... Done
 +The following additional packages will be installed:
 +  chromium-browser
 +Recommended packages:
 +  chromium-browser-l10n
 +The following NEW packages will be installed:
 +  chromium-browser chromium-chromedriver
 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
 +Need to get 130 MB of archives.
 +After this operation, 409 MB of additional disk space will be used.
 +Do you want to continue? [Y/n] y
 +Get:1 https://archive.raspberrypi.org/debian bullseye/main armhf chromium-browser armhf 101.0.4951.57-rpt2 [125 MB]
 +Get:2 https://archive.raspberrypi.org/debian bullseye/main armhf chromium-chromedriver armhf 101.0.4951.57-rpt2 [5,165 kB]
 +Fetched 130 MB in 2min 47s (779 kB/s)
 +debconf: delaying package configuration, since apt-utils is not installed
 +Selecting previously unselected package chromium-browser.
 +(Reading database ... 70998 files and directories currently installed.)
 +Preparing to unpack .../chromium-browser_101.0.4951.57-rpt2_armhf.deb ...
 +Unpacking chromium-browser (101.0.4951.57-rpt2) ...
 +Selecting previously unselected package chromium-chromedriver.
 +Preparing to unpack .../chromium-chromedriver_101.0.4951.57-rpt2_armhf.deb ...
 +Unpacking chromium-chromedriver (101.0.4951.57-rpt2) ...
 +Setting up chromium-browser (101.0.4951.57-rpt2) ...
 +update-alternatives: using /usr/bin/chromium-browser to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
 +update-alternatives: using /usr/bin/chromium-browser to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
 +Setting up chromium-chromedriver (101.0.4951.57-rpt2) ...
 +Processing triggers for hicolor-icon-theme (0.17-2) ...
 +Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u2) ...
 +Processing triggers for mailcap (3.69) ...
 +</code></WRAP>
 +</WRAP>
 +
 +=== 動作確認 ===
 +<WRAP color_term>
 +<WRAP color_command><code>
 +$ chromedriver --version
 +</code></WRAP>
 +<WRAP color_result><code>
 +ChromeDriver 101.0.4951.57 (352920124de66f14c4af140139f61c798937eda9-refs/branch-heads/4951@{#1148})
 +</code></WRAP>
 +</WRAP>
 +
 +<WRAP color_term>
 +<WRAP color_command><code>
 +$ chromedriver --help
 +</code></WRAP>
 +<WRAP color_result><code>
 +Usage: chromedriver [OPTIONS]
 +
 +Options
 +  --port=PORT                     port to listen on
 +  --adb-port=PORT                 adb server port
 +  --log-path=FILE                 write server log to file instead of stderr, increases log level to INFO
 +  --log-level=LEVEL               set log level: ALL, DEBUG, INFO, WARNING, SEVERE, OFF
 +  --verbose                       log verbosely (equivalent to --log-level=ALL)
 +  --silent                        log nothing (equivalent to --log-level=OFF)
 +  --append-log                    append log file instead of rewriting
 +  --replayable                    (experimental) log verbosely and don't truncate long strings so that the log can be replayed.
 +  --version                       print the version number and exit
 +  --url-base                      base URL path prefix for commands, e.g. wd/url
 +  --readable-timestamp            add readable timestamps to log
 +  --enable-chrome-logs            show logs from the browser (overrides other logging options)
 +  --disable-dev-shm-usage         do not use /dev/shm (add this switch if seeing errors related to shared memory)
 +  --allowed-ips=LIST              comma-separated allowlist of remote IP addresses which are allowed to connect to ChromeDriver
 +  --allowed-origins=LIST          comma-separated allowlist of request origins which are allowed to connect to ChromeDriver. Using `*` to allow any host origin is dangerous!
 +</code></WRAP>
 +</WRAP>
 +
 +=== DietPi の chromium-driver は Segmentation fault で動作しない😅💦 ===
 +Raspberry Pi Zero WH の DietPi で armhf 32bit な chromium-driver は Segmentation fault で動作しない😥\\
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><code> <WRAP color_command><code>
行 506: 行 618:
 +++ killed by SIGSEGV +++ +++ killed by SIGSEGV +++
 Segmentation fault😱😭 Segmentation fault😱😭
 +</code></WRAP>
 +</WRAP>
 +参考: [[git>ungoogled-software/ungoogled-chromium/issues/1409|Raspberry Pi Zero W (architecture: armv6l) Segmentation Fault · Issue #1409 · ungoogled-software/ungoogled-chromium]]\\
 +
 +さようなら👋\\
 +<WRAP color_term>
 +<WRAP color_command><code>
 +$ sudo apt remove chromium-driver
 +$ sudo apt autoremove
 +</code></WRAP>
 +<WRAP colot_result><code>
 </code></WRAP> </code></WRAP>
 </WRAP> </WRAP>
  • python/selenium.1653940822.txt.gz
  • 最終更新: 2022/05/31 05:00
  • by ともやん