LoginSignup
2
3

More than 5 years have passed since last update.

dockerでWEBページのスクリーンショットを撮る

Last updated at Posted at 2014-11-29

そういうのあるだろと思ったら、ありました

https://github.com/ubermuda/docker-screenshot
https://registry.hub.docker.com/u/ubermuda/screenshot/

docker hubにアップされていますので、
docker runするだけで動きます。
中身的にはphantomjsっぽいですね

必要な環境

  • docker

実行例

1行だけ!数秒で処理が終わります。

$ docker run --rm -v $PWD:/srv ubermuda/screenshot http://www.yahoo.co.jp yahoo.png 1920px

(初回はdocker pullに時間がかかります)

できたyahoo.png

yahoo.png

問題

以下の問題が問題となりそうですが、各自がんばるしかなさそうです。
phantomjsは詳しくなく、調べてません

  • httpsはうまくいかなかった
  • フォント

Flash

Flashに関しては、難しそうです
phantomjsをあきらめてブラウザを起動するとかvncをどうこうするとか考える必要がありそうです

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3