WebサイトをPDF、PNGで保存しスクラップや、差分チェックする用途で作成。
puppeteer(Chromeのヘッドレスブラウザ)を使用してページをキャプチャします。
DOMでしゅんしゅんする系サイトはうまく取れないことがあるけど。。
クローンしたディレクトリで以下のコマンドを使い、パッケージの復元
$ npm install$ node main.js --help
Usage: main.js [options]
--help, -h
Displays help information about this script
'main.js -h' or 'main.js --help'
--list, -l
URLリストのファイルを指定
"this.js -l url-list.txt" or "this.js --list=url-list.txt"
--url, -u
URLを単体で指定
"this.js -u https://siteurl" or "this.js --url=https://siteurl"
--auth, -a
BASIC認証のUSERとPWを指定
"this.js -b 'user:passwd'" or "this.js --basic='user:passwd'"- 画像差分チェック
- 要ImageMagick
- 移設前移設後でサイトの出力が変わってないか画像ベースでチェックを行えるかテストしてみる。