PhantomJS
PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
한마디로 화면없이 Webkit engine(QT) 을 사용하여 웹사이트 컨트롤 할 수 있는 모듈입니다.
Scriptable Headless WebKit 보통 이와 같이 설명하는데, Headless 라는 말은 머리가 없는 이라는 의미가 아니라 화면이 없는 의미입니다.
How to install
시스템에 한글 폰트가 설치되어 있지 않은 경우:
Screenshot
// screenshot.js
var page = require('webpage').create();
page.open('http://www.daum.net', function () {
page.render('daum.png');
phantom.exit();
});
이후 아래와 같이 실행하면 된다.
See also
Favorite site
- PhantomJS web site
- Phantomjs Preview Introduction
- beautiful Soup, PhantomJS 사용한 javacript web scraping (pubmed)
- imagemagick와 PhantomJS를 사용한 웹 스크린샷
- PhantomJS, CasperJS 사용하여 가상의 비지니스 문제를 해결하자
- Ubuntu 에서 PhantomJS를 설치하는 세가지 방법
- [추천] Node.js를 이용하여 웹 사이트 데이터 가져오기(web scraping, Phantomjs) 1
References
-
Nodejs_and_Phantomjs_-_web_scraping.pdf ↩