Last active
February 28, 2019 09:10
-
-
Save bsdmad/5735705 to your computer and use it in GitHub Desktop.
Selenium を使って Web サイトのスクリーンショットを取得できる、ということなので試してみた。
実際、取れたのでスゴイね! 後はブラウザを非表示にして実行できれば、定期的に自動取得できるかな?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'selenium-webdriver' | |
driver = Selenium::WebDriver.for :firefox | |
driver.navigate.to 'http://www.netforest.ad.jp/' | |
driver.save_screenshot('netforest.png') | |
driver.quit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#テスト | |
## テスト |
Window のリサイズは簡単。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
粘ってみたけど、現時点では
が分からない。ダメなのかな?