Ruby

Seleniumでスクレイピングするときに「is not clickable at point (772, 590). Other element would receive the click:」的なものが出る問題

エラー発生 Seleniumでスクレイピングをする際にheadlessのオプションを追加すると以下のようなエラーが出てくる。 product_src_url_and_img_url_hash[:src_url]: https://~~. Error: unknown error: Element <a href="#" id="ms_001" style="outline:none;" title="...(M)">36</a> is not clickable at point (772, 590). Othe…

【自分用メモ】RubyでNokogiriを使ってスクレイピングする時に役に立ったサイトまとめ

大体ここらへんを見れば書き方がわかった。 クローラ作成に必須!XPATHの記法まとめ liの任意の番目の要素を取得する方法とかも載っていて◯ Nokogiriを使用したクローラーめも メソッド一覧が載っていて◯ RubyのNokogiriを使ってサイトをスクレイピングする …

RSpecでテストする際に、「Warning: you should require 'minitest/autorun' instead. Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'」と警告された。

エラー発生1 RailsでRSpecを使用してテストをした際に以下のような警告文に遭遇。 rubyは2.0.0p247、Railsは4.1.1を使用。 $ bundle exec rspec spec/requests/top_pages_spec.rb Warning: you should require 'minitest/autorun' instead. Warning: or add …

rbenvでrubyをインストールしたら、「rbenv: cannot rehash: /Users/Username/.rbenv/shims/.rbenv-shim exists」と言われた

エラー発生 $ rbenv install 2.1.2 Downloading ruby-2.1.2.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/a5b5c83565f8bd954ee522bd287d2ca1 Installing ruby-2.1.2... Installed ruby-2.1.2 to /Users/Username/.rbenv/versions/2.1.2 rbenv: cannot …