RubyでSeleniumを用いたWEBスクレイピング(Linux)
書き掛け
環境
- Google Comput Engine
- OS:CentOS Linux release 7.6.1810 (Core)
Rubyのインストール
$ sudo yum install git
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ ~/.rbenv/bin/rbenv init
$ source ~/.bash_profile
$ rbenv -v
rbenv 1.1.1-2-g615f844
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ sudo ~/.rbenv/plugins/ruby-build/install.sh
$ rbenv install -l
→インストール可能なrubyのバージョンが表示される
$ sudo yum install -y openssl-devel readline-devel zlib-devel
$ sudo yum -y install bzip2
$ sudo yum -y install gcc
$ export RUBY_CONFIGURE_OPTS=--disable-install-doc
$ rbenv install 2.6.3
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv global 2.6.3
$ ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
ライブラリのインストール
$ gem install selenium-webdriver -r
$ gem install csv -r
$ gem install nokogiri -r
Author And Source
この問題について(RubyでSeleniumを用いたWEBスクレイピング(Linux)), 我々は、より多くの情報をここで見つけました https://qiita.com/hhhhh/items/7de5a70ffabf1a7247df著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .