0
我使用這個blog post提供的代碼捕獲角頁面的快照,但是當我嘗試運行phantomjs:找不到命令
./make-snapshot.sh http://localhost:5757/#!/home
我得到的錯誤
phantomjs: command not found
下面是該文件的內容:
U=$1
P=$(echo "$U" | perl -MURI -le 'chomp($url = <>); print URI->new($url)->fragment')
final_url=$U
P=${P:1}
final_path=./snapshots$P.html
phantomjs .phantomjs-runner.js $final_url > $final_path
更多細節在這個page。
phantomjs作品在我的終端