Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- ISO25000
- 페이지구분
- ISO9126
- casperJS
- phantomjs
- 도커
- SW
- ISO25010
- 서버
- angular2
- 품질 표준
- nodejs
- Nexus
- 소프트웨어
- 품질
- Cheerio
- RxJS
- pylint
- npm repository
- vscode
- angular2 google analytics
- 구글 클라우드 플랫폼
- REQUEST
- angular-cli
- cyber.shinhan
- 신한대학교
- docker
- angular
- 네이버 클라우드 플랫폼
- 크롤링
Archives
- Today
- Total
나를 위한 기록들
[크롤링] casperJS, PhantomJS 로 로그인, 캡쳐 하기 본문
var casper = require('casper').create({verbose: true, logLevel: "debug"});
// URL 및 로그인 정보 변수 --- (※1)
var url = "http:// 나의 티스토리 주소 /admin/center/";
var id = ""; // 아이디
var password = ""; // 비밀번호
casper.start();
casper.open(url);
casper.then(function() {
casper.fill( "#authForm",
{
loginId: id,
password:password
}, true);
});
// 해당 요소 찾아가서 클릭하기
casper.then(function(){
var path = "#blogInfo > ul > li:nth-child(2) > span.txt > a";
if (casper.exists(path)) {
casper.mouseEvent('click', path);
}
casper.wait(3000);
});
casper.then(function(){
casper.capture('capture.png', {
top:0, left:0, width:1024, height:768
});
});
casper.run();
'JS > 크롤링' 카테고리의 다른 글
request, cheerio를 이용하여 웹 크롤링하기 (1) | 2017.09.05 |
---|---|
robots.txt ( 로봇 배제 표준 ) 란 무엇일까? (0) | 2017.04.22 |
Comments