Last active
March 29, 2016 10:26
-
-
Save HIPERCUBE/f2f552b36ccc6278b575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 사전 작업 | |
// chrome://plugins | |
// 크롬에서 위 링크치고 들어가서 PDF Viewer Disable하고 해야함 | |
// http://www.ebsi.co.kr/ebs/xip/xipc/previousPaperList.ebs | |
// 로그인하고 위 링크로 이동한다. | |
// 원하는 년도랑 학년 과목을 선택하고 아래 스크립트를 console에 복붙하면된다. | |
// 다운로드는 문제, 해설만 다운로드하도록 만듬 | |
// | |
// | |
var result = []; | |
//다운로드 | |
function goDownLoadP(imgUrl, wl, irecord, catCd, arCnt, subjectId) { | |
// window.open('http://wdown.ebsi.co.kr/W61001/01exam' + imgUrl,'pdf', 'location=no, resizable=no'); | |
result.push('http://wdown.ebsi.co.kr/W61001/01exam' + imgUrl); | |
} | |
//정답오픈 | |
function goDownLoadJ(imgUrl,wl, irecord, catCd, arCnt, subjectId,subjectNm){ | |
// window.open('/ebs/xip/xipa/retrieveCorrectAnswerImagePop.ebs?imageSrc=' + imgUrl + '&subjectNm=' + setSubjectNm, 'img', 'width=800,height=500,location=no,resizable=no'); | |
} | |
function goDownLoadPH(imgUrl, wl, irecord, catCd, arCnt, subjectId) { | |
// window.open('http://wdown.ebsi.co.kr/W61001/01exam' + imgUrl,'pdf', 'location=no, resizable=no'); | |
result.push('http://wdown.ebsi.co.kr/W61001/01exam' + imgUrl); | |
} | |
function sleep(delay) { | |
var start = new Date().getTime(); | |
while (new Date().getTime() < start + delay); | |
} | |
goPage = function(page) { | |
var strURL = "/ebs/xip/xipc/previousPaperListAjax.ebs"; | |
var strParam = "page=" + page; | |
var chkElement = ''; | |
var radioElement = document.getElementsByName("targetCd"); | |
for ( var i = 0; i < radioElement.length; i++) { | |
if (radioElement[i].checked == true) | |
chkElement = radioElement[i].value; | |
} | |
var selectVal = jQuery('#yearNum').val(); | |
var selectVal2 = chkElement; | |
var selectVal3 = jQuery('#pageSize').val(); | |
var selectVal4 = jQuery('#order').val(); | |
strParam += "&order=" + selectVal4; | |
strParam += "&yearNum=" + selectVal; | |
strParam += "&targetCd=" + selectVal2; | |
strParam += "&pageSize=" + selectVal3; | |
strParam += "&month1=" + jQuery('[name=month1]').val(); | |
strParam += "&month2=" + jQuery('[name=month2]').val(); | |
strParam += "&month3=" + jQuery('[name=month3]').val(); | |
strParam += "&month4=" + jQuery('[name=month4]').val(); | |
strParam += "&month5=" + jQuery('[name=month5]').val(); | |
strParam += "&month6=" + jQuery('[name=month6]').val(); | |
strParam += "&month7=" + jQuery('[name=month7]').val(); | |
strParam += "&month8=" + jQuery('[name=month8]').val(); | |
strParam += "&month9=" + jQuery('[name=month9]').val(); | |
strParam += "&month10=" + jQuery('[name=month10]').val(); | |
strParam += "&month11=" + jQuery('[name=month11]').val(); | |
strParam += "&month12=" + jQuery('[name=month12]').val(); | |
strParam += "&setSubjectList=" + jQuery('[name=setSubjectList]').val(); | |
if (undefined != jQuery('[name=monthNum]').val() && 'undefined' != jQuery('[name=monthNum]').val()) { | |
strParam += "&monthNum=" + jQuery('[name=monthNum]').val(); | |
} | |
jQuery('#div_contentList').html(Utilities.GetWeb(strURL, strParam)); | |
var htmlString = Utilities.GetWeb(strURL, strParam); | |
var regExp = /goDownLoadP.+?\)/g; | |
var functionDatas = htmlString.match(regExp); | |
for(var a in functionDatas) {eval(functionDatas[a]);} | |
}; | |
var allCount = parseInt($("searchCntArea").childNodes[0].textContent)/10; | |
for(var i=0; i<allCount;++i) {goPage(i+1);} | |
for(var i=0; i<result.length;++i){window.open(result[i])} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment